guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

: macro 'SAMPLE_TEXTURE2D' passed 2 arguments, but requires 3 at Assets/Scripts/Plugins/Bakery/shader/ShaderGraph/URP/BakeryDecodeLightmap.hlsl(101) (on switch) #122

Open laurentopia opened 2 years ago

laurentopia commented 2 years ago

do you have a fix for this?

laurentopia commented 2 years ago

answer: float4 lmColor = SAMPLE_TEXTURE2D(unity_Lightmap, samplerunity_Lightmap, lightmapUV); float3 lmDir = SAMPLE_TEXTURE2D(unity_LightmapInd, samplerunity_Lightmap, lightmapUV) * 2 - 1;

guycalledfrank commented 2 years ago

Hmmm I changed the URP include code some time ago, but didn't publish it yet. Does this (my latest) version work too? It avoids the macro completely. BakeryDecodeLightmap.zip

laurentopia commented 2 years ago

no it returns errors image

laurentopia commented 2 years ago

Any perf improvement without the macros or just avoiding RP headaches?

guycalledfrank commented 2 years ago

no it returns errors

BakeryVolumeSpec_float always had float3 output parameters as far as I remember. Did you alter it in your project (for optimization maybe)? They must be definitely float3 in general (specular is colored).

just avoiding RP headaches

just this