Please sign in to comment.
use only one texCoords per surface
the extra compute and boilerplate code seem useless and it already ended in bugs when parallax offset was applied to diffuse, normal, specular but nor glow map, and I would find stupid to add more boilerplate when height map will be implemented diffuse/normal/specular/glow/height maps are component of the same material, so there is no reason to handle their coordinates separately doing this would also avoid the need for a lot of ifdef code when normal/specular/glow/parallax support is disabled and well, that extra code seems useless even when they are enabled it unify the symbol names to var_TexCoords alongside the var_TexDiffuse, var_TexNormal, var_TexSpecular, var_TexGlow there was some occurrence of var_Tex some comments in already rewritten code told that Tr3b had issue with some driver/hardware suffered from "too much var" issue when passed from vp to fp shaders, leading him to abuse some variables, see 72268b, even if I have not faced this issue with hardware that is so old the game is unplayable, this is an even better way to reduce the number of variables passed from vp to fp for multimap material (diffuse/normal/specular/glow), the texCoords used is the diffuse one note that we already computed the parallax texOffset from diffuse coords only, and applied it to other maps as it would be stupid and inefficient to compute the parallax texOffset on each normal/specular/glow coords
- Loading branch information...
Showing with 140 additions and 358 deletions.
- +12 −27 src/engine/renderer/gl_shader.cpp
- +16 −91 src/engine/renderer/gl_shader.h
- +1 −1 src/engine/renderer/glsl_source/cameraEffects_fp.glsl
- +3 −3 src/engine/renderer/glsl_source/cameraEffects_vp.glsl
- +2 −2 src/engine/renderer/glsl_source/fogQuake3_fp.glsl
- +2 −2 src/engine/renderer/glsl_source/fogQuake3_vp.glsl
- +7 −14 src/engine/renderer/glsl_source/forwardLighting_fp.glsl
- +6 −17 src/engine/renderer/glsl_source/forwardLighting_vp.glsl
- +2 −2 src/engine/renderer/glsl_source/generic_fp.glsl
- +5 −5 src/engine/renderer/glsl_source/generic_vp.glsl
- +2 −2 src/engine/renderer/glsl_source/heatHaze_fp.glsl
- +3 −3 src/engine/renderer/glsl_source/heatHaze_vp.glsl
- +8 −17 src/engine/renderer/glsl_source/lightMapping_fp.glsl
- +4 −18 src/engine/renderer/glsl_source/lightMapping_vp.glsl
- +0 −1 src/engine/renderer/glsl_source/lightVolume_omni_fp.glsl
- +2 −2 src/engine/renderer/glsl_source/liquid_fp.glsl
- +3 −3 src/engine/renderer/glsl_source/liquid_vp.glsl
- +2 −2 src/engine/renderer/glsl_source/reflection_CB_fp.glsl
- +3 −3 src/engine/renderer/glsl_source/reflection_CB_vp.glsl
- +2 −2 src/engine/renderer/glsl_source/shadowFill_fp.glsl
- +3 −3 src/engine/renderer/glsl_source/shadowFill_vp.glsl
- +9 −19 src/engine/renderer/glsl_source/vertexLighting_DBS_entity_fp.glsl
- +3 −18 src/engine/renderer/glsl_source/vertexLighting_DBS_entity_vp.glsl
- +8 −18 src/engine/renderer/glsl_source/vertexLighting_DBS_world_fp.glsl
- +3 −18 src/engine/renderer/glsl_source/vertexLighting_DBS_world_vp.glsl
- +15 −15 src/engine/renderer/tr_backend.cpp
- +14 −50 src/engine/renderer/tr_shade.cpp
Oops, something went wrong.