* Updated to latest version of Nifty GUI 1.3

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7270 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 3e34002525
commit 6ed32b479c
  1. BIN
      engine/lib/niftygui/nifty-1.3-SNAPSHOT.jar
  2. BIN
      engine/lib/niftygui/nifty-default-controls-1.3-SNAPSHOT.jar
  3. BIN
      engine/lib/niftygui/nifty-examples-1.3-SNAPSHOT.jar
  4. BIN
      engine/lib/niftygui/nifty-style-black-1.3-SNAPSHOT.jar
  5. 22
      engine/src/core-data/Common/MatDefs/Post/bloomExtract15.frag
  6. 10
      engine/src/core-data/Common/ShaderLib/MultiSample.glsllib

@ -4,30 +4,28 @@ uniform COLORTEXTURE m_Texture;
uniform float m_ExposurePow;
uniform float m_ExposureCutoff;
in vec2 texCoord;
in vec2 texCoord;
#ifdef HAS_GLOWMAP
uniform sampler2D m_GlowMap;
#endif
void main(void)
{
void main(){
vec4 color;
#ifdef DO_EXTRACT
color = getColor(m_Texture, texCoord);
if ( (color.r+color.g+color.b)/3.0 < m_ExposureCutoff ) {
color = vec4(0.0);
}else{
color = pow(color,vec4(m_ExposurePow));
}
color = getColor(m_Texture, texCoord);
if ( (color.r + color.g + color.b) / 3.0 < m_ExposureCutoff ) {
color = vec4(0.0);
}else{
color = pow(color, vec4(m_ExposurePow));
}
#endif
#ifdef HAS_GLOWMAP
vec4 glowColor = texture2D( m_GlowMap, texCoord );
glowColor = pow(glowColor,vec4(m_ExposurePow));
color+=glowColor;
glowColor = pow(glowColor, vec4(m_ExposurePow));
color += glowColor;
#endif
gl_FragColor = color;

@ -1,6 +1,7 @@
#extension GL_ARB_texture_multisample : enable
uniform int m_NumSamples;
uniform int m_NumSamplesDepth;
#ifdef RESOLVE_MS
#define COLORTEXTURE sampler2DMS
#else
@ -9,7 +10,6 @@ uniform int m_NumSamplesDepth;
#ifdef RESOLVE_DEPTH_MS
#define DEPTHTEXTURE sampler2DMS
#else
#define DEPTHTEXTURE sampler2D
#endif
@ -17,10 +17,10 @@ uniform int m_NumSamplesDepth;
vec4 textureFetch(in sampler2DMS tex,in vec2 texC, in int numSamples){
ivec2 iTexC = ivec2(texC * textureSize(tex));
vec4 color = vec4(0.0);
for (int i=0;i<numSamples;i++){
for (int i = 0; i < numSamples; i++){
color += texelFetch(tex, iTexC, i);
}
return color/numSamples;
return color / numSamples;
}
vec4 fetchTextureSample(in sampler2D tex,in vec2 texC,in int sample){
@ -32,11 +32,11 @@ vec4 fetchTextureSample(in sampler2DMS tex,in vec2 texC,in int sample){
return texelFetch(tex, iTexC, sample);
}
vec4 getColor(in sampler2D tex,in vec2 texC){
vec4 getColor(in sampler2D tex, in vec2 texC){
return texture2D(tex,texC);
}
vec4 getColor(in sampler2DMS tex,in vec2 texC){
vec4 getColor(in sampler2DMS tex, in vec2 texC){
return textureFetch(tex,texC,m_NumSamples);
}

Loading…
Cancel
Save