-
Notifications
You must be signed in to change notification settings - Fork 48
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
How to correctly sample light index from the light index texture? #2
Comments
hmm, hard to tell, but also be careful the light texture you pass to shader need to make sure that is correct as well. |
Well, it seems to be a bug of chrome(not sure). By adjusting a few code, it works. But I don't know how it works.... |
@Danielhu229 what kind of bug do you think? what did you do to fix this problem? |
@tiansijie Let me got some time to clear my code and do some test, later I will post here |
Anyway, thanks for your reply. |
1 similar comment
Anyway, thanks for your reply. |
Hi, great works!
I 'm a student and was doing my own implementation according to this repository and the paper below.
Which keeps confusing me is that when I sample from the light index texture, I get twinkle tiles
The width and height of light index texture are both Math.ceil(Math.sqrt(length of index)).
Here is how I sample this texture
The uLightListLengthSqrt is the square root of light Indices length.
listX and listY will be used as the uv coordinate of the light-index texture.
Do you know what's wrong with my code?
The text was updated successfully, but these errors were encountered: