-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Recent examples cleanup #8256
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
Merged
Merged
Recent examples cleanup #8256
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
450ab30
fix compatibility issues between PRs.
bhouston 9c794f6
add exposure control to envmaps_hdr example. add async texture loadi…
bhouston 442960a
add async texture loading to webgl_material_transparency example.
bhouston a723e8b
better defaults, better background and text colors.
bhouston 4f1b093
make text descriptions more readable on small screens.
bhouston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm why is this param now using UnsignedByteType? Doesn't that mean the PMREMGenerator is getting clamped colours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use half or float, it unpacks the *.hdr maps into float or half buffers as appropriate. If you specify UnsignedByte, it keeps the original RGBE byte encoding and does live decoding within the fragment shader (because texture.encoding = THREE.RGBEEncoding.) RGBE is 8bit per channel, but the E is the exponent. Thus it is 16 bit floating point with a shared 8 exponent in the former:
r = R * 2^ ( E * 255 - 128.0 )
g = G * 2^ ( E * 255 - 128.0 )
b = B * 2^ ( E * 255 - 128.0 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, good to know.
Switching it to FloatType produces errors on Windows (ANGLE maybe?). FloatType works fine on OSX.
Error: WebGL: generateMipmap: Texture at base level is not unsized internal format or is not color-renderable or texture-filterable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FloatType worked for me on my Windows PC.
I believe it is related to asking for the right extension before using it. You need both OES_texture_float and oes_texture_float_linear available for float, and oes_texture_half_float and oes_texture_half_float_linear for Half support.