Common.MatDefs.Post.LightScattering.frag Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jme3-effects Show documentation
Show all versions of jme3-effects Show documentation
jMonkeyEngine is a 3-D game engine for adventurous Java developers
#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/MultiSample.glsllib"
uniform COLORTEXTURE m_Texture;
uniform DEPTHTEXTURE m_DepthTexture;
uniform int m_NbSamples;
uniform float m_BlurStart;
uniform float m_BlurWidth;
uniform float m_LightDensity;
uniform vec3 m_LightPosition;
varying vec2 texCoord;
void main(void) {
#ifdef DISPLAY
vec4 colorRes = getColor(m_Texture, texCoord);
float factor = (m_BlurWidth/(float(m_NbSamples) - 1.0));
float scale;
vec2 texCoo = texCoord - m_LightPosition.xy;
vec2 scaledCoord;
vec4 res = vec4(0.0);
for(int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy