Fixed render targets; renamed GuiTest to Editor

This commit is contained in:
2025-07-05 06:03:16 +03:00
parent b2e010bdb4
commit 52d6d31241
8 changed files with 86 additions and 41 deletions

View File

@@ -52,13 +52,13 @@ IN(vec4 vertex, POSITION)
IN(vec3 normal, NORMAL)
// IN(vec3 tangent, TANGENT)
IN(vec3 uv0, TEXCOORD0)
OUT(mat3 rotMatrix, TEXCOORD0)
OUT(vec4 bumpCoordA, TEXCOORD1)
OUT(vec4 bumpCoordB, TEXCOORD2)
OUT(vec3 noiseCoord, TEXCOORD3)
OUT(mat3 rotMatrix, TEXCOORD1)
//OUT(vec4 bumpCoordA, TEXCOORD2)
//OUT(vec4 bumpCoordB, TEXCOORD3)
// OUT(vec3 noiseCoord, TEXCOORD4)
OUT(highp vec4 projectionCoord, TEXCOORD4)
OUT(vec3 eyeDir, TEXCOORD5)
OUT(vec3 oNormal, TEXCOORD6)
//OUT(vec3 eyeDir, TEXCOORD5)
//OUT(vec3 oNormal, TEXCOORD6)
OUT(f32vec3 positionWS, TEXCOORD7)
MAIN_DECLARATION
{
@@ -78,8 +78,8 @@ MAIN_DECLARATION
projectionCoord = mul(textureProjMatrix, vertex);
// Noise map coords
noiseCoord.xy = (uv0.xy + (time * scroll)) * scale;
noiseCoord.z = noise * time;
// noiseCoord.xy = (uv0.xy + (time * scroll)) * scale;
// noiseCoord.z = noise * time;
// wave synthesis using two sine waves at different frequencies and phase shift
for(int i = 0; i<NWAVES; ++i)
{
@@ -99,12 +99,14 @@ MAIN_DECLARATION
rotMatrix = mat3(T, B, N);
gl_Position = P;
// calculate texture coordinates for normal map lookup
#if 0
bumpCoordA.xy = uv0.xy * textureScale + time * bumpSpeed;
bumpCoordA.zw = uv0.xy * textureScale * 2.0 + time * bumpSpeed * 4.0;
bumpCoordB.xy = uv0.xy * textureScale * 4.0 + time * bumpSpeed * 8.0;
#endif
eyeDir = normalize(R.xyz - eyePosition);
oNormal = normalize(normal + N);
// eyeDir = normalize(R.xyz - eyePosition);
// oNormal = normalize(normal + N);
positionWS = mul(world, vertex).xyz;
#else
gl_Position = worldViewProj * vertex;