-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Addresses issue #6587 #6665
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
Draft
Garima3110
wants to merge
37
commits into
processing:main
Choose a base branch
from
Garima3110:cubeMap
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Addresses issue #6587 #6665
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
227fe69
Extending p5.texture for cubemap textures
Garima3110 8e2d05c
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 317d915
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 917de2f
Added vertex and fragment shaders for cubemaps
Garima3110 5139c0a
Updated src/webgl/shaders/lighting.glsl file for cubemaps
Garima3110 45e33d5
Storing the diffuse irradiance in a cubemap texture
Garima3110 1d54fad
Added caching mechanism for shaders
Garima3110 1ff8702
Updated caching for some shaders
Garima3110 6cd7856
Updated p5.Texture.js
Garima3110 4401ebd
Updated cubeVertex and cubeFragment shaders
Garima3110 37751d9
renamed cubemap shader files
Garima3110 93b8b50
Updated p5.RendererGL.js
Garima3110 66dc0dc
Updated p5.Texture.js
Garima3110 cffda69
Updated lighting.glsl
Garima3110 751b16a
Added TEXTURE_CUBE
Garima3110 29e7a14
Added gl.SAMPLER_CUBE uniform type to p5.Shader.js
Garima3110 7981fdc
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 e7cd392
Minor changes in SAMPLER_CUBE uniform type
Garima3110 f30af0e
Minor updates on caching shaders
Garima3110 d51c4a8
Merge branch 'processing:main' into cubeMap
Garima3110 38bcaab
Merge branch 'processing:main' into cubeMap
Garima3110 2558755
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 773198a
Updated RendererGL.js
Garima3110 bbc7c72
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 ffd9097
Reordered some code in p5.RendererGL.js
Garima3110 cc77e7e
Minor fixes
Garima3110 518b0f0
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 c124738
Fragment shader error fixed
Garima3110 38e6e84
Merge remote-tracking branch 'upstream/main' into cubeMap
Garima3110 a585ef5
Minor updates
Garima3110 f118a3b
some fixes
Garima3110 2da03d1
Merge branch 'processing:main' into cubeMap
Garima3110 5961be8
Minor changes
Garima3110 4515c09
Some changes with cubemap implementation
Garima3110 be6d27f
Minor changes
Garima3110 6dc9916
fix
Garima3110 3133e80
Merge branch 'processing:main' into cubeMap
Garima3110 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
Updated p5.RendererGL.js
- Loading branch information
commit 93b8b50dee0320dc5c346504aad2822a9796ed1e
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
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.
Just above this, we create and cache a shader so that we only ever need one copy. Can we add that caching here too?
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.
I have applied caching mechanism to possibly all the shaders. I am not sure whether this aligns with what you were suggesting through this @davepagurek .PLease have a look into the changes I've made.
Thanks.!
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.
I think we don't want to wrap all the existing shader sources in a caching function, since those are just the sources for one part of a shader (e.g. just the vertex or fragment source, and often not the full source either, since we need to add a prefix to it.) A caching function would be good for this
createShadercall (since you're still creating a new shader every time this line is hit, currently.) A few lines up,this.diffusedShaderalready does caching, but can be refactored to use the same caching system you use here if you're factoring that out into a common pattern.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.
oh actually I see that you've added that in
_getCubemapShader. I think rather than making a new shader here, we can just useconst cubemapShader = this._getCubemapShader()instead.