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

ShaderMaterial: Added loop unroll control #12323

Closed
wants to merge 4 commits into from
Closed

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Oct 3, 2017

Solves #12312

@mrdoob
Copy link
Owner

mrdoob commented Oct 9, 2017

I wonder if this is something that we could "hide" in material.defines for the time being without having to touch the API that much...

@Mugen87 Mugen87 changed the title ShaderMaterial: Added .unrollLoops ShaderMaterial: Added loop unroll control Oct 9, 2017
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 9, 2017

Do you mean something like this? 56da730

@Mugen87 Mugen87 closed this Nov 28, 2017
@Mugen87 Mugen87 deleted the dev3 branch December 2, 2017 17:01
@blaze33
Copy link
Contributor

blaze33 commented Dec 21, 2017

Hi ! Could it be considered to reopen the PR ? I had the same issue with a ShaderMaterial where I was trying to add three.js shader chunks to compute shadows and it took me hours to debug it with only 0:102(109): error: sampler arrays indexed with non-constant expressions are forbidden in GLSL 1.30 and later as an error message. Thanks :)

@blaze33
Copy link
Contributor

blaze33 commented Dec 23, 2017

Actually I got it working with :

material.isShaderMaterial = false
material.isMeshStandardMaterial = true
material.isMeshPhysicalMaterial = true

Then I could include lights_template.glsl in my shader material and have the loops unrolled :)

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 6, 2018

Implemented via #13140

@mrdoob mrdoob removed this from the r90 milestone Feb 6, 2018
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

3 participants