bamword15 / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

WorldParameter FrustumNearFar (and possible more) not correctly set #558

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. add FrustumNearFar to WorldParameters in an .j3md

What is the expected output? What do you see instead?

g_FrustumNearFar in the shader should have to same values as as set in the 
Camera. However values are always 1.0, 2.0 (verified by adding a 
System.out.println in UniformBindingManager.updateUniformBindings(List<Uniform> 
params)).
Also ViewProjectionMatrixInverse is always 0 (all entries zero).

Original issue reported on code.google.com by marius.d...@gmail.com on 7 Dec 2012 at 11:09

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 3 Jan 2014 at 10:50

GoogleCodeExporter commented 8 years ago
oh that could explain a lot of problem I have :p

Original comment by remy.bou...@gmail.com on 4 Jan 2014 at 10:37

GoogleCodeExporter commented 8 years ago
I thought the issue was with last svn but I can't reproduce it.

If you are using 3.0 and witness this issue when in a Filter shader, that's 
because in 3.0 the camera used to render the Filter's full screen quad wad not 
the same as the scene camera.
It was a parallel projection camera with that kind of frustum.
In 3.0 it's recommended to pass for camera information yourself to the shader 
as material parameters, and not use the g_ uniforms that are related to the 
camera.

In 3.1 however, the way the Filter are rendered has been changed, and they use 
the same camera. I f the issue is what I decribe then it shoul dbe fixed in 
last SVN and will be in 3.1

Original comment by remy.bou...@gmail.com on 4 Jan 2014 at 7:01