It is currently Wed Jun 19, 2013 8:15 pm

-=Biohazard=- wrote:I know about a few people who tried it and gave up really fast, maybe because they have been spammed with errors after copy and pasting it...
Like Gary said, non-coders would probably have trouble with this - you need to understand the compiler errors you'd get if you want to fix them.
But anyway, this should be super simple to port imho. Especially considering that the materialsystem is based on the 2007 one. If that wasn't the case, there'd be a high potential for a lot of shader work to do...
Regarding the shader stuff, take the vanilla shaderlib.lib from 2007 and the keep the rest. Any compile errors should be simple to fix. For the client/server you can keep all the files and simply fix any occuring errors except for viewrender_deferred.cpp. That file is entirely different and it would make more sense to take the 2007 viewrender file and re-implement the deferred stuff, diff viewrender_deferred with the swarm viewrender file to do so efficiently.


Botolf wrote:- Regarding the shader stuff: Checked for a shaderlib.lib in my 2007 directories, nothing to be found. Okay on this front?
Botolf wrote:- viewrender_deferred.cpp: both your [src\game\client\deferred] viewrender_deferred.cpp and your [src\game\client] viewrender.cpp appear to have deferred rendering code within them, so colour me a little bit confused as to which of these files I'm supposed to be following the lead of when modifying the 2007 viewrender [src\game\client]. I figure the latter was superseded by the former, but it doesn't hurt to be sure.
). Just omit all of that in my baseworldview because 2007 does not even support that flag.Botolf wrote:- Not sure what you mean by diff, I assume it's some kind of side-by-side comparative mode for visual studio .cpps and the like? Once I get this running, I presume there are Alien Swarm-specific bits of code I'm looking to try not to duplicate here?
Botolf wrote:- How difficult would it be to port the editor menus as well? Used them briefly in the swarm mod and they're mighty handy.

2>------ Build started: Project: client, Configuration: Debug Win32 ------
2>cl : Command line warning D9030: '/Gm' is incompatible with multiprocessing; ignoring /MP switch
2> ShaderEditorSystem.cpp
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(232): error C2660: 'MainViewOrigin' : function does not take 0 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(233): error C2660: 'MainViewOrigin' : function does not take 0 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(238): error C2660: 'MainViewForward' : function does not take 0 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(242): error C2660: 'MainViewOrigin' : function does not take 0 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(242): error C2660: 'MainViewOrigin' : function does not take 0 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(651): error C2065: 'RENDER_GROUP_OPAQUE_BRUSH' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(652): error C2065: 'RENDER_GROUP_OPAQUE_BRUSH' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(661): error C2065: 'RENDER_GROUP_CFG_NUM_OPAQUE_ENT_BUCKETS' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(662): error C2065: 'RENDER_GROUP_OPAQUE_ENTITY_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(668): error C2065: 'RENDER_GROUP_CFG_NUM_OPAQUE_ENT_BUCKETS' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(671): error C2065: 'RENDER_GROUP_OPAQUE_ENTITY_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(672): error C2065: 'RENDER_GROUP_OPAQUE_ENTITY_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(685): error C2039: 'm_RenderHandle' : is not a member of 'CClientRenderablesList::CEntry'
2> d:\source\src\game\client\clientleafsystem.h(84) : see declaration of 'CClientRenderablesList::CEntry'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(703): error C2065: 'RENDER_GROUP_CFG_NUM_OPAQUE_ENT_BUCKETS' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(704): error C2065: 'RENDER_GROUP_CFG_NUM_OPAQUE_ENT_BUCKETS' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(706): error C2065: 'RENDER_GROUP_CFG_NUM_OPAQUE_ENT_BUCKETS' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(708): error C2065: 'RENDER_GROUP_OPAQUE_ENTITY_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(709): error C2065: 'RENDER_GROUP_OPAQUE_ENTITY_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(711): error C2065: 'RENDER_GROUP_OPAQUE_STATIC_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(712): error C2065: 'RENDER_GROUP_OPAQUE_STATIC_HUGE' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(715): error C2065: 'RENDER_GROUP_CFG_NUM_OPAQUE_ENT_BUCKETS' : undeclared identifier
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(852): error C2660: 'IClientRenderable::DrawModel' : function does not take 1 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(861): error C2660: 'IClientRenderable::DrawModel' : function does not take 1 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(944): error C2660: 'IStaticPropMgrClient::DrawStaticProps' : function does not take 4 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(950): error C2660: 'IStaticPropMgrClient::DrawStaticProps' : function does not take 4 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1173): error C2039: 'IsTransparent' : is not a member of 'IClientRenderable'
2> d:\source\src\public\iclientrenderable.h(82) : see declaration of 'IClientRenderable'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1184): error C2039: 'm_RenderHandle' : is not a member of 'CClientRenderablesList::CEntry'
2> d:\source\src\game\client\clientleafsystem.h(84) : see declaration of 'CClientRenderablesList::CEntry'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1198): error C2039: 'm_RenderHandle' : is not a member of 'CClientRenderablesList::CEntry'
2> d:\source\src\game\client\clientleafsystem.h(84) : see declaration of 'CClientRenderablesList::CEntry'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1207): error C2039: 'm_RenderHandle' : is not a member of 'CClientRenderablesList::CEntry'
2> d:\source\src\game\client\clientleafsystem.h(84) : see declaration of 'CClientRenderablesList::CEntry'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1214): error C3861: 'swap': identifier not found
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1225): error C2039: 'm_RenderHandle' : is not a member of 'CClientRenderablesList::CEntry'
2> d:\source\src\game\client\clientleafsystem.h(84) : see declaration of 'CClientRenderablesList::CEntry'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1317): error C2039: 'UsesPowerOfTwoFrameBufferTexture' : is not a member of 'IClientRenderable'
2> d:\source\src\public\iclientrenderable.h(82) : see declaration of 'IClientRenderable'
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1344): error C2660: 'IClientRenderable::DrawModel' : function does not take 1 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1465): error C2660: 'IVEngineClient::GetScreenAspectRatio' : function does not take 0 arguments
2>d:\source\src\game\client\shadereditor\shadereditorsystem.cpp(1497): error C2660: 'IClientLeafSystem::CollateViewModelRenderables' : function does not take 2 arguments
2> SEdit_ModelRender.cpp
2>d:\source\src\game\client\shadereditor\sedit_modelrender.cpp(140): error C2065: 'RENDER_GROUP_OPAQUE_ENTITY' : undeclared identifier
2>d:\source\src\game\client\shadereditor\sedit_modelrender.cpp(283): error C2660: 'C_BaseAnimating::DrawModel' : function does not take 1 arguments
2>d:\source\src\game\client\shadereditor\sedit_modelrender.cpp(307): error C2660: 'IVEngineClient::GetScreenAspectRatio' : function does not take 0 arguments
2> Generating Code...

-=Biohazard=- wrote:Are you actually using the shadereditor files from my repo? Because those are just forced to compile for swarm atm, however yours tries to compile for 2007.
The error should be pretty self explanatory if you'd take a look at your file. You don't have SWARM_DLL defined because that aswscratch thingy prbly removed it.

src\materialsystem\shaderlib
My viewrender.cpp should only contain the removal of *several* static keywords because I need those things in global scope to access them from my file. Firstly, copy your 2007 viewrender.cpp and name it viewrender_deferred.cpp. Then take a *fresh* viewrender.cpp from the swarm sdk, do not use mine! Now diff that file with viewrender_deferred, you mainly need to find the differences in renderview() and re-implement them, the rest can be copied more or less.
Now for an additional difficulty I recently copied and changed some generic render functions like DrawOpaqueRenderables and named it DrawOpaqueRenderablesDeferred. I did this to add a decal skip flag where possible (not even possible everywhere so they still break sometimes). Just omit all of that in my baseworldview because 2007 does not even support that flag.
Your SVN client might help you with a diff comparison or an external tool like Beyond Compare would do the job
The lighting editor gui should run natively, you might again encounter simple compile errors caused by things like 'MAX' being 'max' in 2007.


Botolf wrote:src\materialsystem\shaderlib
Checked this location yesterday, double-checked it now. No .lib files of any sort, let alone one named shaderlib.

Botolf wrote:Ah, I know tortoisesvn does diff on older revisions of a file, but not sure about two separate ones. I'll take a look at Beyond Compare, thanks![]()
Santairo wrote:-=Biohazard=- wrote:Are you actually using the shadereditor files from my repo? Because those are just forced to compile for swarm atm, however yours tries to compile for 2007.
The error should be pretty self explanatory if you'd take a look at your file. You don't have SWARM_DLL defined because that aswscratch thingy prbly removed it.
Ah, of course! Completely forgot about that. Everything compiles now! Thanks for the help.


-=Biohazard=- wrote:The project in there builds the shaderlib.lib, I guess I didn't really make that clear earlier.
Santairo wrote:You might want to check out KDiff3 since it's free.


Santairo wrote:I'll be honest, I'm not great at coding (as I proved with the whole SWARM_DLL thing.)
But I figured I may as well jump right in and give it a go.
I've gone through practically every file and compared it to the deferred code and I can't seem to track down the problem. Also, the wall on the left appears to be transparent and I can't figure that one out either... Again, any help would be appreciated.

-=Biohazard=- wrote:That's kinda.. random.. but chances are you're missing something simple I suppose.
Also viewmodels and stuff work fine in my (unmodifed) build for you, right? Maybe try copying the materials from my build too, some of them use deferred_brush and stuff - make sure to also use the vpk or that overridevpk startparam then.



Unhandled exception at 0x0DB0EE80 (shaderapidx9.dll) in swarm.exe: 0xC0000005: Access violation reading location 0x0000000C.




Users browsing this forum: No registered users