The libimage API does not include the original image in the returned mip
array, which might make sense when generating individual files, but for
a KTX bundle, we want to include level 0.
I tested the validity of the resulting KTX files by using macOS Preview,
which can read some types of KTX files. (!)
This CL also adds mipgen to the WebGL build, although its outputs are
not yet used by the sample apps.
This remapping can be confused with roughness, because
linear_roughness = roughness*roughness and
lod = sqrt(linear_roughness)
so the value of lod is roughness, but conceptually
it’s not.
Sometimes the source image might have a useless 1-bit alpha channel
which our image-processing pipeline expands into a proper alpha channel.
This consumes memory and breaks an assertion in our encoder.
I ran into this while testing mipgen with the Suzanne textures.
f90=0, which is nonsensical.
We now assume f0=f90=1, meaning the fresnel term
always evaluates to 1.
Thankfully this didn’t impact the prefilter too much.
IBLs MUST BE REGENERATED
* better comments on calculating the DFG lookup tables
* add comments about computing the “LD” term
* add comments about computing IBL diffuse pre-integration
* be clearer about the determinant of the jacobian
this saves one multiply in the shader, but most
importantly makes the first SH coefficient a
color and reduces its range
ALL IBLs NEED TO BE REGENERATED using cmgen
-—ibl-irradiance generates the diffuse irradiance as
a cubemap using importance sampling.
It can be used in place of the SH version (—-sh-irradiance)
which sometimes presents some ringing artifacts.
* Add StringValue and Choice
* Add editorFactory to nodes
* Update graph model when compiling
* Extract compileNode function
* Change inputs based on shadingModel
* Allow nodes to set shading model
* Fix float literals with dimension 1
* Adjust node height for slots
* Improvements to shader node
* Don't ever set a default value
* Add anisotropy and anisotropyDirection
* Auto-convert MaterialGraphComponent to Kotlin
* Introduce new view rendering
* Add expressionMap to graph
* Show data width on slots
* Compile all nodes when compiling, even unconnected nodes
* Remove old views
* Exclude comments from brace parsing in vertex/fragment blocks
If a comment contained an opening brace { but not the matching
closing one, matc would not count braces properly and not find
the proper end of a vertex/fragment block.
* Add test
* Introduce dimensions to Expression
* Rename to setExpressionForSlot and add redComponent function
* Add Expression helpers to aid with differing data widths
* Add Float2ConstantNode
* Single-line functions when possible
* Add clear coat normal map support
This change allows to set a separate normal map for the clear coat layer of a material.
* Document the new clearCoatNormal property
* Fix typo
* Introduce mipgen frontend.
For now this is fairly simple although it does let you choose a filter.
Another cool feature is that an HTML file is generated which makes it
easy to review the generated miplevels.
This does not expose the Boundary enum to users because it has not yet
been implemented in the core Image library.
* Fix up mipgen per code review.
* Update SPIRV libraries
- Update `spirv-cross`
- Update `spirv-tools`
- Update `glslang`
`spirv-tools` contains a fix for an issue we reported (unnecessary promotions to highp in certain expressions).
* Add SPIRV-Tools dependency to matinfo