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

Add shader precision handling with default setting and material specific override #125

Closed
wants to merge 1 commit into from

Conversation

dmnsgn
Copy link
Member

@dmnsgn dmnsgn commented Jan 14, 2019

  • Parameter override on state creation. Allows the use of a lower precision than the max available if set otherwise default to pex-context maxPrecision: this.precision = opts.precision ? ctx.getMaxPrecision(State.precision) : ctx.capabilities.maxPrecision
  • Automatic precision handling from context in Camera, ReflectionProbe and Skybox
  • Material caching updated to precision precision on top of flags, vert and frag
  • Removed precision strings in all shaders as it is now set on getMaterialProgram or in Camera, ReflectionProbe and Skybox components

Dependent on pex-gl/pex-context#60

@@ -18,7 +18,7 @@ dragon.positions = centerAndNormalize(dragon.positions).map((v) => vec3.scale(v,
dragon.normals = normals(dragon.cells, dragon.positions)
dragon.uvs = dragon.positions.map(() => [0, 0])
const parseHdr = require('parse-hdr')
const ctx = createContext()
const ctx = createContext({ precision: 'mediump' })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added just to test it was working when using a lower precision even with a higher one available.

@dmnsgn dmnsgn added type/feat A new feature and removed feature labels Jul 5, 2022
@dmnsgn
Copy link
Member Author

dmnsgn commented Sep 18, 2023

Related #122
Closing for lack of relevance.

@dmnsgn dmnsgn closed this Sep 18, 2023
@dmnsgn dmnsgn deleted the precision branch May 20, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feat A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant