Page 5 of 7

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 17:25
by Skinnytorus
Oh, man! You did it! \:D/
So far so good. Testing...

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 17:45
by CybeREX
I wounder can we create something like this underwater caustic in wz4? And this cool water too? (its custom pixel shader code?)
WebGL underwater example

PS. ikam, hhmm... something strange happen with my build of wz4... remember your made volume fog with mask? before I only can see something like "G" texture was projected on surface, but with your build I can now see volume fog...

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:01
by ikam
Yop

here a proto that support 16 light per env for testing purposes.
We need to test about performances and if there isn't no regression with complex material, because I changed the size of an important parameter in the pixel shader.
If it is ok and performances are good, we can set 16 as new value.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:05
by ikam
CybeREX wrote:I wounder can we create something like this underwater caustic in wz4? And this cool water too? (its custom pixel shader code?)
WebGL underwater example

PS. ikam, hhmm... something strange happen with my build of wz4... remember your made volume fog with mask? before I only can see something like "G" texture was projected on surface, but with your build I can now see volume fog...


1/ It use many complex techniques to achieve thatn you can't do exactly the same in wz4, but you can approch it. take a look to :
viewtopic.php?f=43&t=1300&hilit=pool

2/ can you send me your example, thanks.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:14
by Skinnytorus
ikam
Applying Multiply by 4 two times results in shader error (all turns red and I have to flush shaders). Is that normal?

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:17
by Skinnytorus
Anyways, I think it might wise to make a switch in wz4 options (or document options?): 8 or 16 lights per Environment. What do you think?

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:22
by ikam
1/ example ? (remmeber the crash with 4+ light that have shadows enabled, it is another bug..., disable shadows)
2/ not possible, it's static parameters defined at compilation.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:32
by Skinnytorus
1) here
2) That's too bad. Doubling lights per environment's gonna make pixel shader check all the 16 lights (no matter how many are used) every frame, right?

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 18:49
by ikam
1/ ok it's a problem with the multiplied spot lights exclusvly, i'll check that.
2/ no, shader doesn't check all lights every frame, only active lights. But there is for sure some place in the c++ code where it check for all 16 lights. But with firsts tests, it doesn't seems to change a lot perf. On my computer I tested a old complex scene, with both version and I only lost 4-5 fps... need to try with others scenes.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 19:08
by Skinnytorus
That's a shame I don't have any really heavy scenes... But anyways, if that's a small impact on performance in your scenes, then apply the hack. We will test that for a while and then come up with the final verdict.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 19:57
by ikam
Skinnytorus: i fixed the prob with multilied spotlight.
I commited changes on github.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 20:07
by Skinnytorus
OK. I'll see what I can do testing that. And by the way, why
MM_MaxParaPS = 88,
and not 96?

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 20:13
by ikam
it seem sufficiant to contain all parameters for now (I'm not sure how to compute the exact value, but lesser value can result bad shader (painted red) with 16 active lights)
Let's see for while, if needed I will adjust this value.

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 20:17
by Skinnytorus
OK. Any luck with 4+ lights and shadow?

Re: Werkkzeug 3 VS Werkkzeug 4 (Texture generator)

PostPosted: Friday, 23.May 2014, 20:18
by ikam
Not yet...

so I think ModLight2 is useless now.
I will delete it.