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

Distortion map texture properties #4932

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

AdaRoseCannon
Copy link
Contributor

Description:

Distortion maps were using the default Wrapping so that when a normal map and a map were provided and there was repeating
the texture would end up cut off e.g.:

image

Changes proposed:

  • Move the material's setTextureProperties out of the system and into the utils
  • use it to set the properties on the distortion maps too

image

@@ -118,6 +148,9 @@ module.exports.updateDistortionMap = function (longType, shader, data) {
if (texture && COLOR_MAPS.has(slot)) {
rendererSystem.applyColorCorrection(texture);
}
if (texture) {
module.exports.setTextureProperties(texture, data);
Copy link
Member

Choose a reason for hiding this comment

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

I think we can name the function above:

module.exports.setTextureProperties = function setTextureProperties(texture, data) {

and call it here:

 if (texture) { setTextureProperties(texture, data); }

A bit cleaner

@dmarcos
Copy link
Member

dmarcos commented Sep 21, 2021

Thanks!

@dmarcos dmarcos merged commit d27fd57 into aframevr:master Sep 21, 2021
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.

2 participants