summaryrefslogtreecommitdiffstats
path: root/tooner_lighting.cginc
Commit message (Collapse)AuthorAge
...
* Implement metallics in PBR overlayyum2024-08-10
|
* Add sampler mode (clamp/repeat) control to PBR overlayyum2024-08-10
| | | | Also add UV channel select to PBR overlay
* Decals can now use a secondary UV channelyum2024-08-10
| | | | | | | | This lets you efficiently create a shit ton of tattoos using a single texture. It also lets you place them over seamlines. Just create a secondary UV map in blender and export as FBX. The shader will pick up this secondary channel and use it, if instructed to do so in the decals UI.
* Add metallic/roughness to decalsyum2024-08-10
| | | | | | | | Also add ability to limit cubemap override to metallic regions of material. Also rename `uv` to `uv0` where appropriate. This is to begin supporting multiple UV maps.
* Decal tweaksyum2024-08-09
| | | | | | | | Move decals after matcap but before rim lighting. I use matcaps for ghetto tonemapping, which causes black decals (tattoos) to look washed out. Also fix decal emission. It's now rgb instead of grayscale.
* Implement overlay roughnessyum2024-08-02
|
* Add controls for overlays on transparent materialsyum2024-08-02
| | | | | | | | Add ability to constrain overlay to parts of the texture based on opacity. Min/max opacity are configurable. Add slider to multiply the overlay's alpha channel. This helps prevent transparent overlays from disappearing in less detailed mip maps.
* Implement stereo instancingyum2024-07-28
| | | | | | | | | | | Seems to fix VR flickering bug. Also: * Add vertex lighting factor * Remove clearcoat 10x factors * Lighting factors now affect clearcoat * Simplify `#pragma multi_compile` bits
* Add facing quad gimmickyum2024-07-26
| | | | | Gimmick makes the quad face the camera, pivoting around the world-space Y axis and the local coordinate system origin.
* Switch to poi-style direct lightingyum2024-07-20
|
* Normalize normalsyum2024-07-20
|
* Add second mask to matcapsyum2024-07-20
| | | | Useful for PBR overlay.
* Temporarily disable direct lighting in outlinesyum2024-07-18
|
* Fix glitter againyum2024-07-18
| | | | | | Flickering got worse. Use rcp() as suggested in shader dev discord. When I originally fixed this, I could still get away with using a normal divide.
* Add spherize vertex location gimmickyum2024-07-18
|
* Add individual lighting multipliersyum2024-07-18
| | | | ... for direct, indirect x {specular,diffuse}
* Add lighting multiplier & reflection probe saturation controlyum2024-07-16
| | | | | | | | | | Also: * Shadow caster works with cutout now * Normalize interpolated mesh normal in fragment shader * Indirect specular affects clearcoat * Bugfix: rename v2f vertex to pos in tessellation shader * Hue shift affects outlines
* Vertex lights now affect clearcoatyum2024-07-15
|
* Rename v2f `vertex` to `pos`yum2024-07-15
| | | | ... for compatibility with Unity shadowing code.
* Switch to Mochie's BRDFyum2024-07-14
| | | | | Better than Unity BRDF and supports things like parameterizable half-lambertian lighting.
* Integration pixellation and trochoid shadersyum2024-07-13
| | | | | | | | | | Trochoid is a WIP. Need to do some magic to make it properly shear. In short: it's currently implemented as a standalone Mesh Renderer object which I place on my avatar's neck bone. Since its object origin is not at the hip bone like everything else, it behaves weirdly when shearing. Solution is to implement it as a regular skinned mesh renderer. Requires some careful analysis to get right.
* Integrate metallic eye shaderyum2024-07-13
|
* Add audiolink to vertex location quantization gimmickyum2024-07-12
|
* Delete unused codeyum2024-07-10
|
* Add hacky multiplier to location quantization gimmickyum2024-07-09
| | | | Useful for animation.
* Add matcap and vertex location quantizationyum2024-07-09
| | | | | | | | | | | | | | | | matcap quantization simply quantizes matcap colors to a configurable # of equal-sized steps. vertex location quantization snaps each vertex location to a quantized location in object space. You can control the direction relative to the mesh normal that this quantization occurs. So if you have skintight clothing, set base direction to -1 and clothing direction to 1. Then skin will quantize inwards, and clothing will quantize outwards. Areas of high curvature (s.a. nips) may still cause problems, so I also added a mask feature. Finally, fix an issue where exploding the mesh causes outlines to appear at the world origin.
* Add angle control to decalsyum2024-07-01
| | | | | | | | Also: * Fix decal mipmap calculation * Decals are now sampled with a clamping sampler, not repeat * Decal scaling now occurs at center, not bottom left
* Add basic decalsyum2024-06-29
| | | | | | | | | | Also add polar masking rim lighting. Polar masking calculates the angle of the matcap UV (theta) and evalutes this function: m_{polar} = 1 / (1 + length(theta - theta_{configured}) It then masks the rim lighting effect using m_{polar}. Quantization applies to this effect.
* Add quantization to rim lightingyum2024-06-28
| | | | Good for artistic effect.
* Implement proper fix to glitter flickering issueyum2024-06-25
| | | | | Discussed in shader dev discord, identified floating point divide as culprit.
* Add glitter option to rim lightingyum2024-06-25
| | | | | | Now rim lighting can illuminate the avatar as if it has glitter on it. Also deprecate glitter seed, since it was unused.
* Rename some fields to 'vertex'yum2024-06-24
| | | | Improves compatibility with things like SPS.
* Add gimmicks folderyum2024-06-23
| | | | | | Catch-all bag for some nascent research. Zero cost if unused. Also organize all shader-side keywords into a single .cginc.
* Overhaul LTCGI againyum2024-06-14
| | | | | Instead of compositing directly on top of the basecolor (???), composite on top of the lighting data.
* Hack in render queue controlyum2024-06-14
|
* LTCGI now uses specularyum2024-06-14
| | | | Also fix _lightmap codepath (unused currently)
* Add overlay emissionyum2024-05-30
| | | | Also start fixing LOD logic for tiling textures
* Add controls for shadow strength & mipmap selectionyum2024-05-27
|
* Use _MainTex and _Coloryum2024-05-27
| | | | Also remove multipliers from gradient-based mipmap sampling.
* Unity sucks fucking ass and balls and dick tooyum2024-05-27
| | | | | | Import order matters. https://catlikecoding.com/unity/tutorials/rendering/part-7/
* Implement shadow receivingyum2024-05-27
|
* Add mix modes to PBR overlay albedo channelyum2024-05-27
|
* Add transparent & transclipping rendering modesyum2024-05-26
|
* PBR overlay bugfixesyum2024-05-26
|
* Overhaul PBR overlayyum2024-05-26
| | | | | | | Add second PBR overlay and fix masking behavior. Also elide keywords based on shader variant. This should improve performance.
* Add scale & offset to some texture fieldsyum2024-05-25
|
* Add stochastic cutout rendering modeyum2024-05-22
| | | | | | Use a randomized threshold instead of a static one when rendering transparency in cutout mode. This lets us render things like fabrics. Requires UVs to work properly.
* Add matcap/rim lighting emissions, matcap distortionyum2024-05-22
|
* Add LICENSE and READMEyum2024-05-13
|
* Add two rim lighting slotsyum2024-05-11
|