- internal cross storage is now always horizontal
and seamless.
- source cross images are now always converted to
internal format, conversion includes rescaling
and sampling if scaling down.
- vertical cross is supported again
- fixes#283
- replace hardcoded constants
This tool was producing bad output for the monkey roughness map because
the monkey map has an (unnecessary) alpha channel, and the tool was
assuming that the source image has 3 channels.
This fixes that particular case and changes the tool so that it
operates on single-channel data instead of 3-channel data.
- front and back labels where inverted:
+z is the front of the cube and -z is its back
when looking at the cube from the outside
with a camera pointing towards -z (and the cube
in front of it). This is the GL definition.
- make the synthetic uvXXX debug environment
colors match those of the debug environment
(except for -Z/back which is magenta instead
of black).
- add some documentation about skybox and cube map.
- cmgen now creates reflections maps for all input
assets by default instead of just for equirectangular
images.
- equirectangular decode doesn't mirror -- that's
done by the mirroring code now.
- mirroring can be turned of with --no-mirror
- option --mirror is gone
- faster mirroring code (do it before generating
mipmaps)
- added labels to faces of debug.png environment
- added a debug equirectangular image in third_party
(creative commons license)
- KTX / OpenGL are PX,NX,PY,NZ,PZ,NZ.
- Cubemap::Face is NX,PX,NY,PY,NZ,PZ.
I considered changing the Cubemap::Face enum, but applying ^1 upon
export seems less intrusive.
For each envmap/skybox pair, this will reduce the number of downloads
from 61 files to 3 files.
Note that we are still using sh.txt for coefficients, I'll see if it
would be easy to embed that in the KTX metadata.
Also, I will add KTX support to roughness-prefilter soon.
* Ability to add code prior to prepareMaterial
* Add normal input on shading node
* Add constant float node
* Add multiply and subtract nodes
* Split math nodes out into MathNodes.kt
(1) Suzanne's normal map is actually linear but we were telling GL that
it is SRGB, so the shader was not reading (0.5,0.5,1.0) from a perfectly
flat normal map.
(2) --linear in mipgen was not honored when consuming PNG files.
(3) The build was not passing --linear to mipgen for the normal map.
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