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

Add environment light intensity in GLSL #1737

Conversation

ashwinbhat
Copy link
Contributor

Introduce a new uniform (u_envLightIntensity) that allows applications to control the light intensity directly in generated shaders. The uniform is a linear multiplier on environment lights. Applications can control the value of the uniform as needed.

image

@jstone-lucasfilm jstone-lucasfilm changed the title Introduce a private uniform for environment light intensity Add environment light intensity in GLSL Mar 19, 2024
Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nearly ready to merge, @ashwinbhat, though I had one question about support in the Viewer on MacOS.

source/MaterialXView/RenderPipelineGL.cpp Show resolved Hide resolved
Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me, thanks @ashwinbhat!

@jstone-lucasfilm jstone-lucasfilm merged commit d58092e into AcademySoftwareFoundation:dev_1.39 Mar 21, 2024
31 checks passed
@ashwinbhat ashwinbhat deleted the bhata/addEnvLightIntensity branch March 21, 2024 16:06
kwokcb added a commit to kwokcb/MaterialX that referenced this pull request Mar 26, 2024
* Use framework linkage for OpenGL on macOS (AcademySoftwareFoundation#1741)

This commit fixes the output of the MaterialXTargets.cmake to have proper system linkage for OpenGL in the cmake config.
Without this change, downstream projects on a Mac like USD cannot build against MaterialX properly.

* Static analysis fixes

This changelist addresses a handful of static analysis warnings flagged by Cppcheck and MSVC.

* Move dynamic analysis tests to MacOS (AcademySoftwareFoundation#1743)

This changelist moves dynamic analysis tests to MacOS in GitHub Actions, allowing them to take advantage of more recent compiler environments and hardware.

* Add environment light intensity in GLSL (AcademySoftwareFoundation#1737)

Introduce a new uniform (u_envLightIntensity) that allows applications to control the light intensity directly in generated shaders. The uniform is a linear multiplier on environment lights. Applications can control the value of the uniform as needed.

* Remove 'baked' suffix from TextureBaker names (AcademySoftwareFoundation#1744)

The texturebaker appended a "_baked" token suffix to the generated material names that changed material name. Some pipelines get impacted by this rename, since the original material name is lost. Removing the suffix to retain original material name.

* Update development build to 1.38.10

* Move prefilter functions to referencing GLSL files

This changelist moves environment prefilter functions into the GLSL files that reference them, addressing shader compilation errors when GenOptions::hwDirectionalAlbedoMethod is set to DIRECTIONAL_ALBEDO_TABLE or DIRECTIONAL_ALBEDO_MONTE_CARLO by the client.

* Move light uniforms into referencing GLSL files (AcademySoftwareFoundation#1750)

This change moves the new environment light intensity uniforms into their referencing GLSL files, addressing shader compilation errors when GenOptions::hwDirectionalAlbedoMethod is set to DIRECTIONAL_ALBEDO_TABLE or DIRECTIONAL_ALBEDO_MONTE_CARLO by the client.

Additionally, the change moves the environment light intensity option from the UI to the command line of the viewer, since isolated adjustments of the indirect lighting term are an unintuitive rendering control for most users.

---------

Co-authored-by: Dhruv Govil <dgovil2@apple.com>
Co-authored-by: Jonathan Stone <jstone@lucasfilm.com>
Co-authored-by: Ashwin Bhat <1727158+ashwinbhat@users.noreply.github.com>
ashwinbhat added a commit to autodesk-forks/MaterialX that referenced this pull request Apr 3, 2024
Introduce a new uniform (u_envLightIntensity) that allows applications to control the light intensity directly in generated shaders. The uniform is a linear multiplier on environment lights. Applications can control the value of the uniform as needed.
jstone-lucasfilm pushed a commit that referenced this pull request Apr 4, 2024
- Add environment light intensity in GLSL (#1737)
- Remove 'baked' suffix from TextureBaker names (#1744)
- Move light uniforms into referencing GLSL files (#1750)
ehlenl pushed a commit to ehlenl/MaterialX that referenced this pull request Apr 12, 2024
…n#1763)

- Add environment light intensity in GLSL (AcademySoftwareFoundation#1737)
- Remove 'baked' suffix from TextureBaker names (AcademySoftwareFoundation#1744)
- Move light uniforms into referencing GLSL files (AcademySoftwareFoundation#1750)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants