mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 21:55:09 +00:00
feat: Update surface colors for floor, ceiling, and wall shaders
This commit is contained in:
@@ -576,9 +576,9 @@ local function create_room_objects()
|
||||
local wall_outer_edge = wall_offset + room.wall_thickness
|
||||
log_debug("Room walls: inner=%.2f outer=%.2f", wall_inner_edge, wall_outer_edge)
|
||||
|
||||
local floor_color = {0.05, 0.7, 0.45}
|
||||
local wall_color = {0.95, 0.25, 0.08}
|
||||
local ceiling_color = {0.95, 0.95, 0.3}
|
||||
local floor_color = {1.0, 1.0, 1.0}
|
||||
local wall_color = {1.0, 1.0, 1.0}
|
||||
local ceiling_color = {1.0, 1.0, 1.0}
|
||||
|
||||
local objects = {
|
||||
create_static_cube({0.0, floor_center_y, 0.0},
|
||||
|
||||
@@ -8,7 +8,7 @@ float hash(vec2 p) {
|
||||
return fract(sin(dot(p, vec2(63.1, 157.9))) * 43758.5453123);
|
||||
}
|
||||
|
||||
const vec3 SURFACE_TINT = vec3(0.95, 0.98, 0.2);
|
||||
const vec3 SURFACE_BASE = vec3(0.98, 0.96, 0.1);
|
||||
|
||||
const vec3 LIGHT_POSITIONS[8] = vec3[8](
|
||||
vec3(13.0, 4.5, 13.0),
|
||||
@@ -33,7 +33,7 @@ float calculateAttenuation(float distance) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec3 baseColor = clamp(fragColor * 1.15 * SURFACE_TINT, 0.0, 1.0);
|
||||
vec3 baseColor = SURFACE_BASE;
|
||||
vec2 gridUv = fragWorldPos.xz * 0.45;
|
||||
vec2 grid = abs(fract(gridUv) - 0.5);
|
||||
float gridLine = step(0.48, max(grid.x, grid.y));
|
||||
|
||||
Binary file not shown.
@@ -8,7 +8,7 @@ float hash(vec2 p) {
|
||||
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);
|
||||
}
|
||||
|
||||
const vec3 SURFACE_TINT = vec3(0.05, 0.85, 0.65);
|
||||
const vec3 SURFACE_BASE = vec3(0.02, 0.95, 0.72);
|
||||
|
||||
const vec3 LIGHT_POSITIONS[8] = vec3[8](
|
||||
vec3(13.0, 4.5, 13.0),
|
||||
@@ -33,7 +33,7 @@ float calculateAttenuation(float distance) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec3 baseColor = clamp(fragColor * 1.1 * SURFACE_TINT, 0.0, 1.0);
|
||||
vec3 baseColor = SURFACE_BASE;
|
||||
float checkerScale = 0.55;
|
||||
float cx = step(0.5, fract(fragWorldPos.x * checkerScale));
|
||||
float cz = step(0.5, fract(fragWorldPos.z * checkerScale));
|
||||
|
||||
Binary file not shown.
@@ -8,7 +8,7 @@ float hash(vec2 p) {
|
||||
return fract(sin(dot(p, vec2(91.7, 127.3))) * 43758.5453123);
|
||||
}
|
||||
|
||||
const vec3 SURFACE_TINT = vec3(1.0, 0.32, 0.08);
|
||||
const vec3 SURFACE_BASE = vec3(0.98, 0.18, 0.08);
|
||||
|
||||
const vec3 LIGHT_POSITIONS[8] = vec3[8](
|
||||
vec3(13.0, 4.5, 13.0),
|
||||
@@ -33,7 +33,7 @@ float calculateAttenuation(float distance) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec3 baseColor = clamp(fragColor * 1.05 * SURFACE_TINT, 0.0, 1.0);
|
||||
vec3 baseColor = SURFACE_BASE;
|
||||
float axisSelector = step(abs(fragWorldPos.z), abs(fragWorldPos.x));
|
||||
float coord = mix(fragWorldPos.z, fragWorldPos.x, axisSelector);
|
||||
float plankScale = 0.4;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user