ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.8k stars 2k forks source link

Missing shader files and shader project #26

Closed AniCator closed 11 years ago

AniCator commented 11 years ago

All of the shaders and the project itself are missing. There isn't even a src/materialsystem directory.

I know that having support for shaders on all platforms is a difficult thing to do but can't at least the Windows code be added back? Or will we have to try to merge it from Source2007 code manually?

fuzzzzzz commented 11 years ago

Yes it would be good to have the materialsystem code access , because i will not being able to port my project on that engine branch without it.

AniCator commented 11 years ago

Yes, we've got a bunch of custom shaders running on our mod and it'd be great to have support for them in 2013.

Sandern commented 11 years ago

Same problem here, I won't be able to port my project from Alien Swarm to this engine either. It's also nice if we can keep overriding the base shader names like in the Alien Swarm SDK. In Source SDK 2007 this is not possible (all "custom" sdk shader names have a SDK_ prefix).

alanedwardes commented 11 years ago

I'm working on the project with AniCator - we have custom shaders, and have modified existing Source shaders to fix isues such as the Flashlightstate_t attenuation.

For us this is a dealbreaker - we'd love to move to SDK 2013 to gain the cross platform support, but as it stands it's not worth it for us without custom shader support. Thanks for looking into this.

Chris528 commented 11 years ago

Source 2007 shaders will work, you just need to copy over the materialsystem folder as well as some various perl scripts. Here's a quick fix. http://pastebin.com/raw.php?i=DryN9Q15

alfred-valve commented 11 years ago

We will be adding the missing material system files in an update next week.

AniCator commented 11 years ago

Thanks alfred. :+1:

fuzzzzzz commented 11 years ago

that's just great, Alfred :)

d10sfan commented 11 years ago

Anything new on this?

JoeLudwig commented 11 years ago

Still working on it. Sometimes "next week" takes a while.

AniCator commented 11 years ago

We all know about your clocks, Valve!

JoelLinn commented 11 years ago

Will be released alongside Ricochet 2 I guess

Barnacle commented 11 years ago

Valve time... it's ok. =)

JoeLudwig commented 11 years ago

This is fixed in the update that just went up.

AniCator commented 11 years ago

Thanks a ton, Joe! :tada:

fuzzzzzz commented 11 years ago

Hello, I post on this older issue because i got some problems, I will try to explain as well just below.

So, I am working on some conversion of some shaders from the Alienswarm engine branch.

First i tried to convert the parallaxtest shaders, but wasn't able to properly integrated the shader in sdk 2013,

I want to use the parallax occlusion mapping with the lightmappedgeneric (dx9) and vertexlitgeneric (dx9) like it is with the Alienswarm, but the source code hasn't been committed on the repository.

I can't add the portions of code (dedicated to the Parallax), into the lightmappedgeneric and vertexlitgeneric shader. So the only possibility I have, is a full port of the ASW materialsystem, a messy task.

to @JoeLudwig, I have a request. Is it possible to commit the full materialsystem source code, as it was with episodic SDK ?

I don't need all the "SDK_" Fallback shader program name , it could just be a simple note on the wiki, because we know than a fallback preffix is necessay for the shader to work and to not be override by the shader from the platform tools. . A second reason why it's important to commit the shaders codes, it a problem because people can't learn shaders authoring on this engine branch; if you are new and have to understand globally the materialsystem, there is nothing to start. Myself i had to read the ASW source code,to decrypt the functioning of the parallax mapping support through the VertexLitGeneric and LightmappedGeneric shaders :/.

I think it important, as it a wide source of information that are missing from the sdk.

Nicolas Kirsch

alanedwardes commented 11 years ago

We pulled all of the SDK_* shaders right out of our 2007 repo and they worked fine in 2013 (inc. LightmappedGeneric, VertexLitGeneric etc) - we only needed to juggle around some #ifdef GAME_SHADER_DLL pieces of code to get it all playing nicely.

We needed to use our own to fix issues with env_projectedtexture and to add @AniCator's LightmappedGeneric phong.

If I'm understanding you though, this will let you do what you want to do right?

fuzzzzzz commented 11 years ago

Hello Alan, yes I think it fit my need, but it should be better if valve release the source code that fit the engine branch (2013) I think there is some more because 2013 is (in some way) based on the 2009/L4D engine branch.

Thanks for the fast reply :)

alanedwardes commented 11 years ago

Okay, sure.

From what I've seen though, 2013 has nothing to do with the Left 4 Dead branch, it is just the 2007 engine with the GL backend and some other stuff - nothing like shaders or code pulled in from other Valve games. I think it's (roughly) what the Steam version of Half-Life 2, the episodes and Portal 1 are running now, so I don't think you're missing out on anything by not having the exact shaders.

It is a bit weird they weren't added though admittedly. It would've saved us a few days work, so if they add them now I'll be a tad peeved ;)

fuzzzzzz commented 11 years ago

i can't really say what is the 2013 engine branch, i discover news things every days:) Well if they add the shader sources now, it can save my time and probably not only mine but for other people who port their mods to 2013, and there are some for sure, so please Valve release the sources ;) also it would be preferable than i ma not the only person to ask for that.

AniCator commented 11 years ago

I have to inform you that this does contain updated code. There are traces of the pyro vision goggle code including support for rendering a separate depth buffer. The code for rendering the extra depth pass is actually based on code written by Drew Watts. Which is very interesting.

fuzzzzzz commented 11 years ago

sorry for the misunderstanding, but are you talking about the 2013 materialssystem or the "2007 version" you just ported to estranged ?

AniCator commented 11 years ago

The Pyro Vision thing? I was talking about 2013.

On 1 September 2013 02:15, RedEyes notifications@github.com wrote:

sorry for the misunderstanding, but are you talking about the 2013 materialssystem or the "2007 version" you just ported to estranged ?

— Reply to this email directly or view it on GitHubhttps://github.com/ValveSoftware/source-sdk-2013/issues/26#issuecomment-23616396 .

fuzzzzzz commented 11 years ago

a good reason to request the sources :)

alanedwardes commented 11 years ago

Ah ofc, I forgot about Team Fortress 2. I haven't seen any evidence that you'll get shaders from any other games though, but I guess it depends what you're after.

I'd also open it as a separate issue if you'd like any action on it :)

JoeLudwig commented 11 years ago

Please open a new issue and tell me which specific files you'd like to see added. The old stdshaders project included every shader in Source as of that time with their names changed to SDK_ unfortunately that rename is required and makes integrating new changes difficult. I can certainly add a few more of the base files if that's all you need.

The 2013 version of the SDK is based on the Orange Box engine that is used by TF2, CS: Source, Day of Defeat, HL2 (+ episodes), and Portal. Nothing from L4D, Portal 2, CS:GO, Dota 2, or Alien Swarm is included.

fuzzzzzz commented 11 years ago

@JoeLudwig, all right i can create a new issue, but it represents lot of files to list, with all the .cpp, .h, .vsh, .psh, *.fxc. it would not easier to just push all the "SDK_" files and all the source code that are need to build the game_shader_dx9.dll ? because there is around 266 files to list :) and we should jsut adding the FXC in std_shader_dx20b.txt and dx30.txt, we can enable them just in case we just want to rebuild some of the FXC/VSH/PSH files. If by any way i misunderstood your purpose and the 2013 version of the shader you have does'nt not fit the fallback name with the "SDK" preffix, we can make the changes ourself, its alway less work then entirely re-add oll the 2007 shader, as it doen't fit the last improvements of the 2013.

JoeLudwig commented 11 years ago

Yeah, that's not going to happen. I looked at doing that when I added shaders back in, but the old SDK files don't deal well with the OSX/Linux changes and the renames make the new files difficult to deal with. Also, wild cards don't count as "specific." :)

What files do you actually need?

It's not that the SDK prefix is required, it's that there can be no overlap between the shader names in the mod's shader DLL and stdshaders_dx9.dll. Because all the existing shaders were in the old SDK they were all renamed to make them actually able to load.

fuzzzzzz commented 11 years ago

What is not going to happen ? :) The conversion of the 2013 shaders with the SDK preffix or release the source code of all the 2013 shaders(without the SDK conversion) ? why not release the source code of the shaders that works well with OSX/linux ? we don't ask you to adapt the shaders name, if std_shaderdx9.dll can just prevent the overlap of the shader from mod directory.

the files i need, are all the "lightmapped_generic" and "vertexlit_unlit_generic" but i am preparing a list for you :)

JoeLudwig commented 11 years ago

Pulling in all the stuff from the 2007 SDK isn't going to happen. Neither is pulling in everything from stdshaders as it stands now (mostly because of all the TF2 shaders included in that list.)

Materialsystem.dll is what demands that I change the names. We don't allow a mod to override an existing shader.

AniCator commented 11 years ago

You can get most of the SDK_ .fxc, .h and .cpp files from Source2007. For SDK_LightmappedGeneric I was missing the lightmappedgeneric_dx9.cpp file so I used the one from Alien Swarm and modified it to work with Source 2007. Which wasn't too much of a hassle. (we lifted it over to 2013 when we were porting Estranged) Making the shader project compile on multiple platforms takes some work because of case-sensitive filenames and other issues but we managed to get it all the work. We're just having an issue on Mac where the screenspace shaders output darker colours but that could be because we're not using the FinalOutput function on all of them.

saul commented 11 years ago

Joe, I suggest the following solution:

IIRC, game shaders cannot override base shaders for cheat reasons (what about SP-only games? the current protection is pointless)... my solution fixes that issue with minimal changes required by yourself. As long as the engine still hash checks the client DLL to ensure that it is the same as the server's, then this is as secure as the rest of the engine.

fuzzzzzz commented 11 years ago

What Anicator explains here : https://github.com/ValveSoftware/source-sdk-2013/issues/26#issuecomment-23669735 Because it's a kind of regression if we are using the 2007 version of the shaders in 2013. And as you told us Joe, the shaders are not entirely compatible with OSX and Linux System.

So i posted my request here : https://github.com/ValveSoftware/source-sdk-2013/issues/172