Skip to content

renderer: make GLSL code easier to read with computeLight, computeDeluxeLight and computeDynamicLights#1032

Merged
illwieckz merged 1 commit intomasterfrom
illwieckz/easier-glsl-code
Jan 23, 2024
Merged

renderer: make GLSL code easier to read with computeLight, computeDeluxeLight and computeDynamicLights#1032
illwieckz merged 1 commit intomasterfrom
illwieckz/easier-glsl-code

Conversation

@illwieckz
Copy link
Copy Markdown
Member

Make GLSL code easier to read with computeLight, computeDirectionalLight and computeDynamicLights.

The real magic is in lightMapping_fp.glsl, it makes easier to spot the actual alternative code to directional light computation that was previously disseminated everywhere, we now have a simple if/else condition calling one or the other function.

@slipher
Copy link
Copy Markdown
Member

slipher commented Jan 23, 2024

"Directional light" is a term of art (see this for example) meaning something else, so it would be better to avoid this name.

@illwieckz
Copy link
Copy Markdown
Member Author

At first I wrote “DeluxeLight”, I don't know if that means something, but at least in this context we would know what it is about.

@slipher
Copy link
Copy Markdown
Member

slipher commented Jan 23, 2024

DeluxeLight works for me.

@illwieckz
Copy link
Copy Markdown
Member Author

What about computeSpecularLight?

@illwieckz
Copy link
Copy Markdown
Member Author

Well, computing specular light is only a subset of that compute…

@illwieckz illwieckz force-pushed the illwieckz/easier-glsl-code branch 2 times, most recently from 5277d07 to d41d232 Compare January 23, 2024 04:17
@illwieckz illwieckz changed the title renderer: make GLSL code easier to read with computeLight, computeDirectionalLight and computeDynamicLights renderer: make GLSL code easier to read with computeLight, computeDeluxeLight and computeDynamicLights Jan 23, 2024
@illwieckz
Copy link
Copy Markdown
Member Author

I've set computeDeluxeMap.

@slipher
Copy link
Copy Markdown
Member

slipher commented Jan 23, 2024

LGTM

@illwieckz illwieckz merged commit 7027712 into master Jan 23, 2024
@illwieckz illwieckz deleted the illwieckz/easier-glsl-code branch January 23, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants