From 367c9c3799168a5ecf170dbf8d69734d03b88974 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Thu, 25 Aug 2011 16:25:52 +0000 Subject: [PATCH] Fixed typo in FXAA filter git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8087 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-data/Common/MatDefs/Post/FXAA.j3md | 2 +- engine/src/core-data/Common/MatDefs/Post/FXAA.vert | 4 ++-- .../desktop-fx/com/jme3/post/filters/FXAAFilter.java | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engine/src/core-data/Common/MatDefs/Post/FXAA.j3md b/engine/src/core-data/Common/MatDefs/Post/FXAA.j3md index 88401f529..78fff9374 100644 --- a/engine/src/core-data/Common/MatDefs/Post/FXAA.j3md +++ b/engine/src/core-data/Common/MatDefs/Post/FXAA.j3md @@ -2,7 +2,7 @@ MaterialDef FXAA { MaterialParameters { Int NumSamples Texture2D Texture - Float SubPixelShif + Float SubPixelShift Float VxOffset Float SpanMax Float ReduceMul diff --git a/engine/src/core-data/Common/MatDefs/Post/FXAA.vert b/engine/src/core-data/Common/MatDefs/Post/FXAA.vert index 659492634..f4ba2e328 100644 --- a/engine/src/core-data/Common/MatDefs/Post/FXAA.vert +++ b/engine/src/core-data/Common/MatDefs/Post/FXAA.vert @@ -3,7 +3,7 @@ uniform vec2 g_Resolution; attribute vec4 inPosition; attribute vec2 inTexCoord; varying vec2 texCoord; -uniform float m_SubPixelShif; +uniform float m_SubPixelShift; varying vec4 posPos; void main() { gl_Position = inPosition * 2.0 - 1.0; //vec4(pos, 0.0, 1.0); @@ -11,5 +11,5 @@ void main() { vec2 rcpFrame = vec2(1.0/g_Resolution.x, 1.0/g_Resolution.y); posPos.xy = inTexCoord.xy; posPos.zw = inTexCoord.xy - - (rcpFrame * (0.5 + m_SubPixelShif)); + (rcpFrame * (0.5 + m_SubPixelShift)); } \ No newline at end of file diff --git a/engine/src/desktop-fx/com/jme3/post/filters/FXAAFilter.java b/engine/src/desktop-fx/com/jme3/post/filters/FXAAFilter.java index 27de14569..8ba3c16bb 100644 --- a/engine/src/desktop-fx/com/jme3/post/filters/FXAAFilter.java +++ b/engine/src/desktop-fx/com/jme3/post/filters/FXAAFilter.java @@ -15,7 +15,7 @@ import com.jme3.renderer.ViewPort; */ public class FXAAFilter extends Filter { - private float subPixelShif = 1.0f / 4.0f; + private float subPixelShift = 1.0f / 4.0f; private float vxOffset = 0.0f; private float spanMax = 8.0f; private float reduceMul = 1.0f / 8.0f; @@ -28,7 +28,7 @@ public class FXAAFilter extends Filter { protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) { material = new Material(manager, "Common/MatDefs/Post/FXAA.j3md"); - material.setFloat("SubPixelShif", subPixelShif); + material.setFloat("SubPixelShift", subPixelShift); material.setFloat("VxOffset", vxOffset); material.setFloat("SpanMax", spanMax); material.setFloat("ReduceMul", reduceMul); @@ -52,9 +52,9 @@ public class FXAAFilter extends Filter { * @param subPixelShift */ public void setSubPixelShift(float subPixelShift) { - subPixelShif = subPixelShift; + this.subPixelShift = subPixelShift; if (material != null) { - material.setFloat("SubPixelShif", subPixelShif); + material.setFloat("SubPixelShif", this.subPixelShift); } } @@ -85,8 +85,8 @@ public class FXAAFilter extends Filter { return spanMax; } - public float getSubPixelShif() { - return subPixelShif; + public float getSubPixelShift() { + return subPixelShift; } public float getVxOffset() {