shadercompiler
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| shadercompiler [2021/05/02 17:37] – old revision restored (2021/05/02 15:35) 73.95.178.156 | shadercompiler [2025/01/15 04:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| Consider this code: | Consider this code: | ||
| - | < | + | < |
| #pragma shader_feature_local_fragment _ _ALBEDO; | #pragma shader_feature_local_fragment _ _ALBEDO; | ||
| TEXTURE2D(_Albedo); | TEXTURE2D(_Albedo); | ||
| Line 21: | Line 21: | ||
| </ | </ | ||
| - | When compiling, two variants are created, one for when albedo is on, another for when it's off. This will throw an error saying that sampler_albedo cannot be found((Note: | + | When compiling, two variants are created, one for when albedo is on, another for when it's off. This will throw an error saying that sampler_albedo cannot be found((Note: |
| ''" | ''" | ||
| Line 33: | Line 33: | ||
| * Make sure you always sample the texture associated with the sampler so it doesn' | * Make sure you always sample the texture associated with the sampler so it doesn' | ||
| - | < | + | < |
| result *= saturate(1 + SAMPLE_TEXTURE2D_LOD(_Albedo, | result *= saturate(1 + SAMPLE_TEXTURE2D_LOD(_Albedo, | ||
| return result; | return result; | ||
shadercompiler.1619977075.txt.gz · Last modified: 2025/01/15 04:35 (external edit)