-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easy use of custom GLSL shaders for mappers #2
Comments
I've never quite liked the idea of embedding vertex and fragment programs into shaders. Three points:
|
Ok, I get what you mean. But imho the reason artists and mappers are so bad at shaders is that nearly all engines make it damn hard to play around with them (e.g. you will hardly ever find an artist writing a shader from scratch, but adapting an existing on is well within reach) and that only a few have a nice node-based editor for them. However the real advances in the look of a game come when artists actually are able to mess with the shaders, as for example seen with the UDK. Thus it would be great if you could come up with some way of allowing artists to make custom shader materials. Maybe there could be an way of simply declaring a custom GLSL function in the q3 shader, aka similar to this: P.S.: Both Blender and jmonkey3 have now node-based shader editors since very recently and allow for exporting the GLSL code, so it is more likely that an artist will come up with custom GLSL code now. |
In my opinion current syntax for materials is more than adequate ana allows 2013/6/18 poVoq notifications@github.com
Best regards, |
hmm, ok. But how would I as a artist/mapper and semi illiterate coder implement something like this for level custom textures: |
Ummm, just use the 'material' keyword + snow texture as decal parameter or 2013/6/18 poVoq notifications@github.com
Best regards, |
Ok I looked up the "material" keyword and it seems to me that that is just the regular diffuse/normal/gloss shader used on all surfaces. There is no way this could be combined with a snow decal texture to get the same effect (which is based on taking the world normals and the hight channel of the normal-map to calculate the pixels on the texture that get covered with the snow texture for each in game surface individually). However do you mean with "or another material pass" that is is possible to easily add another "material" like keyword, lets say "snowmaterial" that loads another custom GLSL shader and applies it to only to the textures with have this keyword in their q3 like shader? However if this case is true, that what would be the big difference to the OA implementation? Sorry if I seem a bit dense in this regards... I am still struggling to understand all that GLSL shader stuff (and I am more of an artist than a coder). |
No, that means you can layer materials like this: { But ye, you're right, one can't do per-pixel effects such as reading from 2013/6/19 poVoq notifications@github.com
Best regards, |
You seem to be avoiding to answer my actual question ;) |
No, and I said, it's going to stay this way for the foreseeable future. 2013/6/19 poVoq notifications@github.com
Best regards, |
Ok, thanks for the clear answer. Really a pity though. |
I'll reopen this issue when I think I've come up with a good idea for 2013/6/19 poVoq notifications@github.com
Best regards, |
Maybe this kind of system could be duplicated: |
It seems like something like this is very close to being possible now that q3 shaders are parsed on the GPU and glsl shaders are read from the harddrive.
IMHO the best way would probably be if the q3 shader syntax was extended to allow inline GLSL code, or to allow for custom referencing of GLSL code in another file.
Ultimately an easy to use shader node system like used in UDK would be of course the greatest for mappers, but for now an easy to understand way of doing it through the q3 shader system would be great too.
One use could be for example to make an custom shader that takes world normals and dust maps to calculate a direction based snow-cover on textures and map-models, or to add heat-disortion to a flame effect etc.
I hope this made sense and can be added to the engine.
Edit: There seems to be some work on-going to allow for something like that in ioQuake3 (see OpenArena forums), so maybe it would make sense to make a compatible system in qfusion.
The text was updated successfully, but these errors were encountered: