Minor cleanup.

This commit is contained in:
Shyotl
2017-03-13 23:54:56 -05:00
parent 75c47e96b6
commit d42e380698
44 changed files with 101 additions and 142 deletions

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#define INDEXED 1
#define NON_INDEXED 2

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
@@ -86,7 +86,7 @@ vec3 decode_normal (vec2 enc)
void main()
{
vec2 tc = vary_fragcoord.xy;
vec2 tc = vary_fragcoord.xy;
vec3 norm = texture2D(normalMap, tc).xyz;
norm = decode_normal(norm.xy); // unpack norm
@@ -110,7 +110,7 @@ void main()
for (int i = 1; i < 4; i++)
{
vec2 samptc = (tc + i * dlt);
vec3 samppos = getPosition(samptc).xyz;
vec3 samppos = getPosition(samptc).xyz;
float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
if (d*d <= pointplanedist_tolerance_pow2)

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -22,9 +22,6 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
//#extension GL_ARB_shader_texture_lod : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -29,7 +29,6 @@
#define DIFFUSE_ALPHA_MODE_EMISSIVE 3
uniform float emissive_brightness;
//uniform float display_gamma;
vec3 srgb_to_linear(vec3 cs)
{

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -31,8 +31,6 @@ out vec4 frag_color;
//class 1 -- no shadows
//#extension GL_ARB_texture_rectangle : enable
//#extension GL_ARB_shader_texture_lod : enable
uniform sampler2D diffuseRect;
uniform sampler2D specularRect;
@@ -286,11 +284,12 @@ void main()
if (ds < 0.0)
{
vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
stc /= stc.w;
if (stc.z > 0.0)
{
stc /= stc.w;
float fatten = clamp(envIntensity*envIntensity+envIntensity*0.25, 0.25, 1.0);
stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,8 +23,6 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
//#extension GL_ARB_shader_texture_lod : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,8 +23,6 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
//#extension GL_ARB_shader_texture_lod : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -25,7 +25,7 @@
//class 1, no shadow, no SSAO, should never be called
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -151,7 +151,7 @@ void main()
vec4 fb = texture2D(screenTex, distort);
frag_data[0] = vec4(/*linear_to_srgb*/(fb.rgb), 1.0); // diffuse
frag_data[0] = vec4(fb.rgb, 1.0); // diffuse
frag_data[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec
frag_data[2] = vec4(encode_normal(wavef), 0.0, 0.0); // normalxyz, displace
}

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_data[3];
@@ -37,10 +37,6 @@ vec3 atmosTransport(vec3 inColor);
uniform sampler2D bumpMap;
uniform sampler2D screenTex;
uniform sampler2D refTex;
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
uniform sampler2D noiseMap;
uniform mat4 shadow_matrix[6];

View File

@@ -5,7 +5,7 @@
* $License$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -5,7 +5,7 @@
* $License$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -5,7 +5,7 @@
* $License$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -5,7 +5,7 @@
* $License$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -1,4 +1,4 @@
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -5,7 +5,7 @@
* $License$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -29,7 +29,7 @@ out vec4 frag_color;
#define frag_color gl_FragColor
#endif
//#extension GL_ARB_texture_rectangle : enable
uniform sampler2D glowMap;
uniform sampler2D screenMap;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,8 +23,6 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
//#extension GL_ARB_shader_texture_lod : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -23,8 +23,6 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
//#extension GL_ARB_shader_texture_lod : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
@@ -230,7 +228,7 @@ void main()
vec4 spec = texture2D(specularRect, frag.xy);
float noise = texture2D(noiseMap, frag.xy/128.0).b;
float noise = texture2D(noiseMap, frag.xy/128.0).b; // This is probably wrong
vec3 dlit = vec3(0, 0, 0);
if (proj_tc.z > 0.0 &&

View File

@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;

View File

@@ -22,7 +22,7 @@
* $/LicenseInfo$
*/
//#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;