// TAVR - AUTO RADAR. v 2.0.0
de_tavr_test
{
- "CTSpawn_x" "0.400000"
- "CTSpawn_y" "0.060000"
- "TSpawn_x" "0.300000"
- "TSpawn_y" "0.880000"
+ "TSpawn_x" "0.700000"
+ "TSpawn_y" "0.330000"
"material" "overviews/de_tavr_test"
- "pos_x" "-1832.000000"
- "pos_y" "1728.000000"
- "scale" "5.190000"
+ "pos_x" "-2432.000000"
+ "pos_y" "3531.000000"
+ "scale" "4.880000"
}
int main(int argc, char* argv[]) {
std::cout << "Loading VMF\n";
- vmf::vmf vmf_main("map_01.vmf");
+ vmf::vmf vmf_main("de_tavr_test.vmf");
std::cout << "Initializing OpenGL\n";
#version 330 core
-// Note:: All channels marked with an ** are currently not filled out by the engine.
-
// OPENGL
// ____________________________________________________________________________________________
in vec2 TexCoords;
// SHADER HELPERS
// ____________________________________________________________________________________________
-// ( A collection of simple blend modes )
+// ( Simple sample with offset )
vec2 pixel_size = 1.0 / vec2(textureSize(tex_in, 0));
vec4 getSample(vec2 offset)
{
{
vec4 sIn = getSample(vec2(0,0));
- int sampleCount = 32;
+ //Temp
+ int sampleCount = 64;
int outlineWidth = 1;
vec2 sT = vec2(0, 0);
- vec2 thisHeight = vec2(1, 1)-getSample(vec2(0,0)).rg;
+ // Glow sampler ==========================================================
for(int x = 0; x <= sampleCount; x++)
{
for(int y = 0; y <= sampleCount; y++)
{
- sT += vec2(1, 1)-getSample(vec2(-16 + x,-16 + y)).rg;
+ sT += (vec2(1, 1)-getSample(vec2(-32 + x,-32 + y)).rg) * (1 - ((abs(-32 +x) * abs(-32 +y)) / 512));
}
}
+ // Outline sampler =======================================================
vec2 olT = vec2(0, 0);
for(int x = 0; x <= outlineWidth * 2; x++)
{
float global_opacity = 0.25;
sT /= (sampleCount * sampleCount);
- sT *= 0.5;
+ sT = vec2(pow(sT.r, 1.5), pow(sT.g, 1.5));
+ sT *= 0.75;
FragColor = vec4((sIn.r * olT.r) + (sIn.r * sT.r) + (sIn.r * global_opacity), (sIn.g * olT.g) + (sIn.g * sT.g) + (sIn.g * global_opacity), 0, sIn.r + sIn.g);
- //r: sIn
- //g: olT
- //b: sT
}
\ No newline at end of file
#version 330 core
-// Note:: All channels marked with an ** are currently not filled out by the engine.
-
// OPENGL
// ____________________________________________________________________________________________
in vec2 TexCoords;
// SHADER HELPERS
// ____________________________________________________________________________________________
-// ( A collection of simple blend modes )
+// ( Simple sample with offset )
vec2 pixel_size = 1.0 / vec2(textureSize(tex_in, 0));
vec4 getSample(vec2 offset)
{
}
else
{
+ //Temp
int sampleCount = 32;
int outlineWidth = 2;
+ // Glow sampler ==========================================================
float sT = 0;
- float thisHeight = getSample(vec2(0,0)).g;
-
for(int x = 0; x <= sampleCount; x++)
{
for(int y = 0; y <= sampleCount; y++)
}
}
+ //Adjust slightly
sT *= 2;
+ sT /= (sampleCount * sampleCount);
+ // Outline sampler =======================================================
float olT = 0;
for(int x = 0; x <= outlineWidth * 2; x++)
{
olT += getSample(vec2(-outlineWidth + x,-outlineWidth + y)).r;
}
}
-
- clamp(olT, 0, 1);
-
- sT /= (sampleCount * sampleCount);
+
FragColor = vec4(sIn.r, sIn.g, sT, olT);
}
}
\ No newline at end of file
vec4 sPlayspace = vec4(texture(tex_playspace, TexCoords));
vec4 sObjectives = vec4(texture(tex_objectives, TexCoords));
+ vec4 final = sBackground;
+ final = blend_normal(final, ao_color, sPlayspace.b);
+ final = blend_normal(final, sample_gradient(sPlayspace.g), sPlayspace.r);
+ final = blend_normal(final, outline_color, sPlayspace.a - sPlayspace.r);
+ final = blend_add(final, sObjectives, sObjectives.a);
+
// Return the final output color
- FragColor = blend_add(blend_normal(blend_normal(blend_normal(sBackground, ao_color, sPlayspace.b), sample_gradient(sPlayspace.g), sPlayspace.r), outline_color, sPlayspace.a -sPlayspace.r), sObjectives, sObjectives.a * 0.75);
+ FragColor = final;
}
\ No newline at end of file