-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Added HDR (arbitrary encoding) support to CubeTexturePass #16900
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
Closed
DanielSturk
wants to merge
25
commits into
mrdoob:dev
from
DanielSturk:mainline-cube-texture-pass-hdr
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c4dcfc5
WIP: Added hdr support to cubeTexturePass
DanielSturk 5cc50bc
Added hdr support to cubeTexturePass
DanielSturk ade17f9
Replaced ShaderMaterial(ShaderLib.cube) with MeshCubeMaterial in WebG…
DanielSturk a853125
Merge remote-tracking branch 'mrdoob/dev' into mainline-cube-texture-…
DanielSturk 799bf1c
Merge remote-tracking branch 'mrdoob/dev' into mainline-cube-texture-…
DanielSturk bac05aa
Added changes to /examples/jsm. Fixed declarations
DanielSturk 0905e1f
Fixed CI formatting errors
DanielSturk d18e36e
Added newline for CI check
DanielSturk a204d66
Forgot to flip cube maps
DanielSturk bf973aa
Renamed MeshCubeMaterial to SkyboxMaterial
DanielSturk 989fdd2
Missed a couple spaces in the last commit
DanielSturk 3099b18
Removed clipping planes and log depth buffer
DanielSturk 8939d85
Renamed variable
DanielSturk 70a4dc6
Removed comment
DanielSturk 8d32c8a
Undid changes to WebGLBackground
DanielSturk b183d9e
Merge remote-tracking branch 'mrdoob/dev' into mainline-cube-texture-…
DanielSturk e62e9cc
Removed unnecessary varying 'vViewPosition'
DanielSturk 00a14a1
Merge remote-tracking branch 'mrdoob/dev' into mainline-cube-texture-…
DanielSturk f33550e
Update webgl_postprocessing_backgrounds.html
DanielSturk 3161d6d
reverted gammaOutput, changed default hdr parameters
DanielSturk a99287d
Fixed import convention
DanielSturk 0a473c8
Added back gammaOutput=true and sRGB encoding to demo
DanielSturk e4ada7d
Fixed background not aligning with reflection in objects
DanielSturk 2b6a568
Copied changes from examples/jsm to examples/js
DanielSturk 3520706
Removed commented code
DanielSturk 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Texture } from './../textures/Texture'; | ||
import { MaterialParameters, Material } from './Material'; | ||
/** | ||
* parameters is an object with one or more properties defining the material's appearance. | ||
*/ | ||
export interface SkyboxMaterialParameters extends MaterialParameters { | ||
envMap?: Texture; | ||
envMapIntensity?: number; | ||
opacity: number; | ||
} | ||
|
||
export class SkyboxMaterial extends Material { | ||
|
||
constructor( parameters?: SkyboxMaterialParameters ); | ||
|
||
envMap?: Texture; | ||
envMapIntensity?: number; | ||
opacity: number; | ||
roughness: number; | ||
|
||
setValues( parameters: SkyboxMaterialParameters ): void; | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { Material } from './Material'; | ||
import { BackSide } from '../constants'; | ||
|
||
/** | ||
* @author bhouston / https://clara.io | ||
* | ||
* parameters = { | ||
* | ||
* } | ||
*/ | ||
|
||
function SkyboxMaterial( parameters ) { | ||
|
||
Material.call( this ); | ||
|
||
this.type = 'SkyboxMaterial'; | ||
|
||
this.envMap = null; | ||
this.envMapIntensity = 1.0; | ||
|
||
this.roughness = 0.0; | ||
|
||
this.depthTest = false; | ||
this.depthWrite = false; | ||
this.side = BackSide; | ||
|
||
this.lights = false; | ||
|
||
this.setValues( parameters ); | ||
|
||
} | ||
|
||
SkyboxMaterial.prototype = Object.create( Material.prototype ); | ||
SkyboxMaterial.prototype.constructor = SkyboxMaterial; | ||
|
||
SkyboxMaterial.prototype.isSkyboxMaterial = true; | ||
|
||
SkyboxMaterial.prototype.copy = function ( source ) { | ||
|
||
Material.prototype.copy.call( this, source ); | ||
|
||
this.envMap = source.envMap; | ||
this.envMapIntensity = source.envMapIntensity; | ||
|
||
this.roughness = source.roughness; | ||
|
||
return this; | ||
|
||
}; | ||
|
||
export { SkyboxMaterial }; |
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
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
Oops, something went wrong.
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.
Perhaps
blurriness
is a better property name in this case.