Okay. I'll try that class someday, I guess it'll require more files to add. But sounds better than using ManualObject nowadays.
But I'm also thinking of having whole HUD done in shader (since a while) similar to that demo, it even has antialiased stuff. It would allow really cool effects, like any elements, not from texture, glow, whole screen flash, drops on screen etc. Only font would need more care I guess. I think this isn't too much to handle for GPUs these days.
Could you also answer my previous post questions? viewtopic.php?p=553815#p553815 also that soft particles part.
I'm starting to write shaders and it is a bit overwhelming at start. Especially seeing so much code already written and so many cases , respect.
Also a couple of new, related questions:
- Can I write postprocess shaders in .any? Or are those v1 and must be have full code in .glsl and .hlsl etc?
- What is the minimal set for a new shader? I'd like to use .any files, since they are translated. But then, any other stuff like structs with params and samplers etc, need to be separate in glsl and hlsl files, do I get this right?
- What should I do if I want my own variant of Pbs shader for glass pipes? It has 2 passes: 1st with
cull_hardware clockwise
, and 2nd with cull_hardwareanticlockwise
. This way at least I got rid of those freaking slice ellipses issue. What could be the best / minimal approach to modify for this? I don't want to change too much, since Pbs already works for me. - I'm guessing for things like grass / trees wind I don't want to have own Hlms right? I can just add a parameter for Pbs and use it in grass trees materials and just skip in all others. Same with grass fading in distance.
- Only big things like water would need own Hlms with big cpp code for it too, right? I'm trying to avoid this and use Pbs as much as possible.
- Can I have an unlit variant but with some sort of basic diffuse light for particles, grass etc, done from Pbs? I really can't have unlit particles, they need to be darker in shadows and change colors from sun diffuse on other sceneries etc.
- So if Pbs already has 4 detail maps, are those sampled if not present? Or just the ones specified are used and end in shader?
I got to keep watch on microcodeCodeCache.cache I once after a while saw it had 1GB and game was starting slow. Doesn't take much to reach over 100MB after some shader editing.