render3d(vulkan): the ground reads the sun cascades itself - no separate terrain sun pass
tersun.frag rasterised every terrain patch a second time into a screen buffer, because on OpenGL the cascade read inside terrain.frag fell off a driver cliff (about 6 ms a frame). Vulkan has no such cliff: its terrain programs are the SUN_INLINE variant, which evaluates the same two tiers with the same normal and cross-fade in the ground's own shader, and terrain_draw skips the pass - in the frame and in the water reflection. OpenGL keeps the pass. R3D_SUN_PASS=1 keeps it on Vulkan, for comparing. Mac Vulkan town 1759 -> 1692 draws; frames within 2/255 of the pass (15331 px, float rounding). PC camp 1984 -> 1882 draws, 3.9 s for 400 frames either way, self-tests 59/59, validation 0. OpenGL frames byte-identical. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
eb1cd3e01a
commit
44ecd55a86
10 changed files with 240 additions and 5 deletions
|
|
@ -46,5 +46,8 @@ skin.vert|shadow.frag|#define SHADOW_PASS;#define ALPHA_TEST;
|
|||
terrain.vert|terrain.frag|
|
||||
terrain.vert|terrain.frag|#define FAR_ONLY;
|
||||
terrain.vert|terrain.frag|#define NEAR_ONLY;
|
||||
terrain.vert|terrain.frag|#define SUN_INLINE;
|
||||
terrain.vert|terrain.frag|#define SUN_INLINE;#define FAR_ONLY;
|
||||
terrain.vert|terrain.frag|#define SUN_INLINE;#define NEAR_ONLY;
|
||||
terrain.vert|tersun.frag|
|
||||
water.vert|water.frag|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue