mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
GFX card profile config file logging moved to debug only
WIP mode of guiSliderCtrl to be a filled rectangle instead of a textured UI Fixed bug with guiTextEditCtrl losing focus updating history passing malformed strings Updated WIP options menu Editor/Project settings WIP Updated editor theme to be consistent, and feed off the editor settings Updated popup menus to reference renamed profiles Added more in-progress modules for examples/stress testing
This commit is contained in:
parent
226529fd1b
commit
f1777016b8
179 changed files with 10144 additions and 415 deletions
21
Templates/Modules/PostFXPack/Shaders/blackAndWhiteP.hlsl
Normal file
21
Templates/Modules/PostFXPack/Shaders/blackAndWhiteP.hlsl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
base.a = 1.0f;
|
||||
|
||||
base.rgb = (base.r + base.g + base.b) / 3.0f;
|
||||
|
||||
if (base.r < 0.5)
|
||||
base.r = 0.0f;
|
||||
else
|
||||
base.r = 1.0f;
|
||||
|
||||
base.gb = base.r;
|
||||
|
||||
return base;
|
||||
}
|
||||
29
Templates/Modules/PostFXPack/Shaders/blurredVisionP.hlsl
Normal file
29
Templates/Modules/PostFXPack/Shaders/blurredVisionP.hlsl
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float BlurredVisionIntensity;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.001 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.003 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.005 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.007 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.009 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.011 * BlurredVisionIntensity));
|
||||
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.001 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.003 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.005 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.007 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.009 * BlurredVisionIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.011 * BlurredVisionIntensity));
|
||||
|
||||
base = base / 15.0; // 9.5
|
||||
|
||||
return base;
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
uniform float accumTime;
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float intensity;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float2 coords = IN.uv0;
|
||||
float2 uv = IN.uv0;
|
||||
|
||||
coords = (coords - 0.5) * 2.0;
|
||||
|
||||
float coordDot = dot(coords, coords);
|
||||
|
||||
float2 uvG = uv - TORQUE_TEX2D(backBuffer, IN.uv0).xy * intensity * coords * coordDot;
|
||||
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
|
||||
base.g = TORQUE_TEX2D(backBuffer, uvG).g;
|
||||
|
||||
return base;
|
||||
}
|
||||
39
Templates/Modules/PostFXPack/Shaders/crossStitchP.hlsl
Normal file
39
Templates/Modules/PostFXPack/Shaders/crossStitchP.hlsl
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float time;
|
||||
uniform float sizeX; // rt_w
|
||||
uniform float sizeY; // rt_h
|
||||
uniform float stitching_size = 6.0;
|
||||
uniform int invert = 0;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = float4(0.0, 0.0, 0.0, 0.0);
|
||||
float size = stitching_size;
|
||||
float2 cPos = IN.uv0 * float2(sizeX, sizeY);
|
||||
float2 tlPos = floor(cPos / float2(size, size));
|
||||
tlPos *= size;
|
||||
int remX = int(cPos.x % size);
|
||||
int remY = int(cPos.y % size);
|
||||
if (remX == 0 && remY == 0)
|
||||
tlPos = cPos;
|
||||
float2 blPos = tlPos;
|
||||
blPos.y += (size - 1.0);
|
||||
if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y)))))
|
||||
{
|
||||
if (invert == 1)
|
||||
base = float4(0.2, 0.15, 0.05, 1.0);
|
||||
else
|
||||
base = TORQUE_TEX2D(backBuffer, tlPos * float2(1.0/sizeX, 1.0/sizeY)) * 1.4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (invert == 1)
|
||||
base = TORQUE_TEX2D(backBuffer, tlPos * float2(1.0/sizeX, 1.0/sizeY)) * 1.4;
|
||||
else
|
||||
base = float4(0.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
return base;
|
||||
}
|
||||
30
Templates/Modules/PostFXPack/Shaders/dreamviewP.hlsl
Normal file
30
Templates/Modules/PostFXPack/Shaders/dreamviewP.hlsl
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float DreamViewIntensity;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.001 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.003 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.005 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.007 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.009 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.011 * DreamViewIntensity));
|
||||
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.001 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.003 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.005 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.007 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.009 * DreamViewIntensity));
|
||||
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.011 * DreamViewIntensity));
|
||||
|
||||
base.rgb = (base.r + base.g + base.b)/3.0;
|
||||
base = base / 9.5;
|
||||
|
||||
return base;
|
||||
}
|
||||
48
Templates/Modules/PostFXPack/Shaders/edgeDetectionP.hlsl
Normal file
48
Templates/Modules/PostFXPack/Shaders/edgeDetectionP.hlsl
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float threshold;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
|
||||
const int NUM = 9;
|
||||
|
||||
const float2 c[NUM] =
|
||||
{
|
||||
float2(-0.0078125, 0.0078125),
|
||||
float2( 0.00 , 0.0078125),
|
||||
float2( 0.0078125, 0.0078125),
|
||||
float2(-0.0078125, 0.00 ),
|
||||
float2( 0.0, 0.0),
|
||||
float2( 0.0078125, 0.007 ),
|
||||
float2(-0.0078125,-0.0078125),
|
||||
float2( 0.00 , -0.0078125),
|
||||
float2( 0.0078125,-0.0078125),
|
||||
};
|
||||
|
||||
int i;
|
||||
float3 col[NUM];
|
||||
|
||||
for (i=0; i < NUM; i++)
|
||||
{
|
||||
col[i] = TORQUE_TEX2D(backBuffer, IN.uv0 + 0.2*c[i]);
|
||||
}
|
||||
|
||||
float3 rgb2lum = float3(0.30, 0.59, 0.11);
|
||||
float lum[NUM];
|
||||
for (i = 0; i < NUM; i++)
|
||||
{
|
||||
lum[i] = dot(col[i].xyz, rgb2lum);
|
||||
}
|
||||
|
||||
float x = lum[2]+ lum[8]+2*lum[5]-lum[0]-2*lum[3]-lum[6];
|
||||
float y = lum[6]+2*lum[7]+ lum[8]-lum[0]-2*lum[1]-lum[2];
|
||||
float edge =(x*x + y*y < threshold)? 1.0:0.0;
|
||||
|
||||
base.rgb *= edge;
|
||||
|
||||
return base;
|
||||
}
|
||||
14
Templates/Modules/PostFXPack/Shaders/lensCircleP.hlsl
Normal file
14
Templates/Modules/PostFXPack/Shaders/lensCircleP.hlsl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float radiusX;
|
||||
uniform float radiusY;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
float dist = distance(IN.uv0, float2(0.5,0.5));
|
||||
base.rgb *= smoothstep(radiusX, radiusY, dist);
|
||||
return base;
|
||||
}
|
||||
13
Templates/Modules/PostFXPack/Shaders/monochromeP.hlsl
Normal file
13
Templates/Modules/PostFXPack/Shaders/monochromeP.hlsl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
|
||||
base.rgb = (base.r + base.g + base.b) / 3.0f;
|
||||
|
||||
return base;
|
||||
}
|
||||
11
Templates/Modules/PostFXPack/Shaders/negativeP.hlsl
Normal file
11
Templates/Modules/PostFXPack/Shaders/negativeP.hlsl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
base.a = 0;
|
||||
return float4(1.0f, 1.0f, 1.0f, 1.0f) - base;
|
||||
}
|
||||
48
Templates/Modules/PostFXPack/Shaders/nightVision2P.hlsl
Normal file
48
Templates/Modules/PostFXPack/Shaders/nightVision2P.hlsl
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
uniform float accumTime;
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float luminanceThreshold; // 0.2
|
||||
uniform float colorAmplification; // 4.0
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float speed = 100;
|
||||
float Yres = 1024;
|
||||
float brightness = 0.2;
|
||||
|
||||
float4 finalColor = float4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
float2 uv;
|
||||
uv.x = 0.4 * sin(accumTime * 50.0);
|
||||
uv.y = 0.4 * cos(accumTime * 50.0);
|
||||
//float m = TORQUE_TEX2D(maskTex, gl_TexCoord[0].st).r;
|
||||
//vec3 n = texture2D(noiseTex, (gl_TexCoord[0].st*3.5) + uv).rgb;
|
||||
float3 c = TORQUE_TEX2D(backBuffer, IN.uv0).rgb;
|
||||
|
||||
float lum = dot(float3(0.30, 0.59, 0.11), c);
|
||||
if (lum < luminanceThreshold)
|
||||
c *= colorAmplification;
|
||||
|
||||
float3 visionColor = float3(0.1, 0.95, 0.2);
|
||||
finalColor.rgb = c * visionColor;
|
||||
|
||||
// add noise
|
||||
float noise = IN.uv0.x * IN.uv0.y * accumTime * speed;
|
||||
noise = fmod(noise, 10) * fmod(noise, 100);
|
||||
noise = fmod(noise, 0.01);
|
||||
|
||||
float3 color = finalColor.rgb;
|
||||
color = color + color * saturate(noise.xxx * 200);
|
||||
|
||||
// add banding
|
||||
float sin,cos;
|
||||
sincos(IN.uv0.y * Yres, sin, cos);
|
||||
color += color * float3(sin, cos, sin) * brightness;
|
||||
|
||||
finalColor.rgb = color;
|
||||
|
||||
return finalColor;
|
||||
|
||||
}
|
||||
21
Templates/Modules/PostFXPack/Shaders/pixelateP.hlsl
Normal file
21
Templates/Modules/PostFXPack/Shaders/pixelateP.hlsl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float pixel_w;
|
||||
uniform float pixel_h;
|
||||
uniform float sizeX;
|
||||
uniform float sizeY;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float2 uv = IN.uv0;
|
||||
|
||||
float3 base = float3(1.0, 0.0, 0.0);
|
||||
float dx = pixel_w * (1.0 / sizeX);
|
||||
float dy = pixel_h * (1.0 / sizeY);
|
||||
float2 coord = float2(dx*floor(uv.x/dx), dy*floor(uv.y/dy));
|
||||
base = TORQUE_TEX2D(backBuffer, coord).rgb;
|
||||
|
||||
return float4(base, 1.0);
|
||||
}
|
||||
17
Templates/Modules/PostFXPack/Shaders/posterisationP.hlsl
Normal file
17
Templates/Modules/PostFXPack/Shaders/posterisationP.hlsl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float gamma;
|
||||
uniform float numColors;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float3 base = TORQUE_TEX2D(backBuffer, IN.uv0).rgb;
|
||||
base = pow(base, float3(gamma, gamma, gamma));
|
||||
base = base * numColors;
|
||||
base = floor(base);
|
||||
base = base / numColors;
|
||||
base = pow(base, float3(1.0/gamma, 1.0/gamma, 1.0/gamma));
|
||||
return float4(base, 1.0);
|
||||
}
|
||||
16
Templates/Modules/PostFXPack/Shaders/rgbP.hlsl
Normal file
16
Templates/Modules/PostFXPack/Shaders/rgbP.hlsl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
uniform float redLevel;
|
||||
uniform float greenLevel;
|
||||
uniform float blueLevel;
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
base.r *= redLevel;
|
||||
base.g *= greenLevel;
|
||||
base.b *= blueLevel;
|
||||
return base;
|
||||
}
|
||||
25
Templates/Modules/PostFXPack/Shaders/zoomBlurP.hlsl
Normal file
25
Templates/Modules/PostFXPack/Shaders/zoomBlurP.hlsl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "shaders/common/postFx/postFx.hlsl"
|
||||
#include "../../torque.hlsl"
|
||||
|
||||
uniform float amount;
|
||||
uniform float samples;
|
||||
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
|
||||
|
||||
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
|
||||
{
|
||||
float b = 0;
|
||||
|
||||
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
|
||||
float2 uv = IN.uv0;
|
||||
|
||||
[loop] for (int i = 1; i <= samples; i++)
|
||||
{
|
||||
uv -= b;
|
||||
uv *= amount;
|
||||
b = (1-(1*pow(abs(amount), i))) / 2;
|
||||
uv += b;
|
||||
base += TORQUE_TEX2DLOD(backBuffer, float4(uv.x, uv.y, 0, 0));
|
||||
}
|
||||
|
||||
return base / (samples + 1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue