* Added ResolutionInverse (thanks kwando)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9210 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
7a7b2c3f5f
commit
b2e086bbee
@ -429,6 +429,10 @@ public class RenderManager {
|
|||||||
tempVec2.set(viewWidth, viewHeight);
|
tempVec2.set(viewWidth, viewHeight);
|
||||||
u.setValue(VarType.Vector2, tempVec2);
|
u.setValue(VarType.Vector2, tempVec2);
|
||||||
break;
|
break;
|
||||||
|
case ResolutionInverse:
|
||||||
|
tempVec2.set(1f / viewWidth, 1f / viewHeight);
|
||||||
|
u.setValue(VarType.Vector2, tempVec2);
|
||||||
|
break;
|
||||||
case Aspect:
|
case Aspect:
|
||||||
float aspect = ((float) viewWidth) / viewHeight;
|
float aspect = ((float) viewWidth) / viewHeight;
|
||||||
u.setValue(VarType.Float, aspect);
|
u.setValue(VarType.Float, aspect);
|
||||||
|
@ -120,6 +120,12 @@ public enum UniformBinding {
|
|||||||
*/
|
*/
|
||||||
Resolution,
|
Resolution,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The inverse of the resolution, 1/width and 1/height.
|
||||||
|
* Type: vec2
|
||||||
|
*/
|
||||||
|
ResolutionInverse,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Aspect ratio of the resolution currently set. Width/Height.
|
* Aspect ratio of the resolution currently set. Width/Height.
|
||||||
* Type: float
|
* Type: float
|
||||||
|
Loading…
x
Reference in New Issue
Block a user