All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Common.MatDefs.Post.LightScattering.frag Maven / Gradle / Ivy

There is a newer version: 3.7.0-stable
Show newest version
#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