I just updated jMP, created a new test (through new projects → jME tests), found TestTransparentShadows.java in the light folder, but it is still the old file for me. That still works great tho, and I like that weird fire put there on the rocks.
@EmpirePhoenix said:
Actually do i have to implement both tehniques? (Since my minimal requirement is opengl3.0+ anyway, it would be just a waste for those few lines)
Yeah in that case you just need the PostShadow15.
Some precision though, your texture that holds alpha information has to be named ColorMap or DiffuseMap and you need an AlphaDiscardThreshold float that determine the apha value below which the pixels will be discarded.
If i fly into the shadow area of the tree, the shadow on the sphere starts flickering and you see some bad grafic effects at the leaves which receive shadows.
ERROR: 0:52: Use of undeclared identifier ‘pixSize’
ERROR: 0:55: Use of undeclared identifier ‘pixSize2’
ERROR: 0:56: Use of undeclared identifier ‘coord’
[/java]
I did not try your testcase but my own project where I use the PostWater effect. Did no changes except nightly update. Oh, also using OSX. Maybe the shader compiler is more strict here.
There’s something called alpha threshold you can use. the pixel shader will discard pixels with alpha lower then the threshold you set.You could maybe try threshold of 0.5 and see, then adapt to the level you think look good.
The flickering issue does exist when you get close to the ball. Also, if you’re really close to the ball where some of the front-side tris will be culled because it’s too close, you’ll see the back side’s shadow being rendered. Not really an issue, but worth mentioning.
GTX 480 + Win 7 x64.
EDIT:
Forgot to add. @nehon next time you have a test, would you be so kind as to bold the name and give the directory it’s in please? It would make things easier and faster.
@madjack said:
Forgot to add. nehon next time you have a test, would you be so kind as to bold the name and give the directory it's in please? It would make things easier and faster. ;)