Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some tr_shade/glsl code cleanup #206

Open
wants to merge 11 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@illwieckz
Copy link
Member

commented Apr 28, 2019

While I was working on a branch to collapse the reflection cube map stage with the common lightmap one, I did this clean-up.

It makes working on this part of the code easier, but don't have to wait for featural changes to be merged.

Note that one commit makes sure reflective specular is not used whith PBR assets since current reflective specular code is not PBR compatible.

@illwieckz illwieckz force-pushed the illwieckz:shade-cleanup branch 2 times, most recently from d678f79 to 064c77b Apr 28, 2019

}
else
{
Render_lightMapping( stage, false, false, false );
Render_lightMapping( stage, false, false );
}
}
else if ( backEnd.currentEntity != &tr.worldEntity )

This comment has been minimized.

Copy link
@slipher

slipher Apr 30, 2019

Member

This can be reached if r_vertexLighting = 0 and tess.lightmapNum is invalid which doesn't seem right.

This comment has been minimized.

Copy link
@illwieckz

illwieckz May 1, 2019

Author Member

is it something introduced by my change or something that was already there?

This comment has been minimized.

Copy link
@slipher

slipher May 3, 2019

Member

Already there. Leave a TODO?

Show resolved Hide resolved src/engine/renderer/tr_shader.cpp Outdated
Show resolved Hide resolved src/engine/renderer/glsl_source/vertexLighting_DBS_entity_fp.glsl Outdated
Show resolved Hide resolved src/engine/renderer/glsl_source/dispersion_C_fp.glsl Outdated

illwieckz added some commits Apr 27, 2019

glsl: unify some symbol names
Sometime incident ray is named I, sometime R
while reflection ray is usually named R
and viewDir is sometime named eyeDir
and normal in world space is usually named N
but sometime named N2 because N is already taken
for something else.

It's better to use the same names consistently
accross the source code when it's name the same
thing, and it's better to use full-word variable
names when they are not loop iterators.

@illwieckz illwieckz force-pushed the illwieckz:shade-cleanup branch from 064c77b to 62c479d May 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.