
+28
Under review
Lightmap support for Custom Lighting Shader
It would be nice to have a non gray out checkbox for Lightmap support under the lighting tab like with Bling-Phong for the Custom Lighting...
Or maybe a tutorial on how to decode lightmap with custom lighting would be great!
Or maybe a tutorial on how to decode lightmap with custom lighting would be great!
Customer support service by UserEcho
Should lightmapping simply always be a replacement for light direction and light color, or should they be separate nodes?
Vertex Input Struct :
#ifdef LIGHTMAP_ON
half4 texcoord1 : TEXCOORD1;
#endif
Frag Input Struct :
#ifdef LIGHTMAP_ON
half2 uv2 : TEXCOORD1;
#endif
Shader Variables :
#ifdef LIGHTMAP_ON
fixed4 unity_LightmapST;
sampler2D unity_Lightmap;
#endif
Vert Function :
#ifdef LIGHTMAP_ON
o.uv2 = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw;
#endif
Frag Function :
#ifdef LIGHTMAP_ON
fixed3 lightmap = DecodeLightmap(tex2D(unity_Lightmap, i.uv2));
// execute whatever you want to do with lightmap here
#endif
However, it would have to handle the fact that LIGHTMAP_ON might be false.
float3 lightmap = float3(1, 1, 1);
#ifdef LIGHTMAP_ON
lightmap = DecodeLightmap(tex2D(unity_Lightmap, i.uv2));
#endif
//do whatever
the user could even choose the default color
However, mind that lightmapping is not only a single lightmap decode.
For single lightmaps - yes, that's pretty much it.
But not for dual lightmaps, and not for directional lightmaps.
Dual lightmaps need to handle the blend between direct LM without RT lights, and direct RT lights without direct LM.
Directional lightmaps need to have a separate output for its light direction, which also brings forth a few design issues as well as implementation quirks.
In addition, it needs to handle HDR vs LDR, as well as all of this in deferred rendering in addition to forward rendering
Joachim, if it's not too much to ask, would you mind giving a basic run-down of what's changed/why it's more complicated?
The problem arises when you want to do something, well, other than that. Their structures is still what keeps the entire pipeline running and if you want to break that pipeline out, you have to backtrack all of that code and filter everything for what you need. PBR is very, intertwined, in a way, because for instance, you have to have specularity, PBR doesn't make sense without it. But in Shader Forge, you can choose not to use it. But then you want to still access lightmaps built for a PBR pipe.
Another issue is that lightmapping has several types, which require branching, and custom branching is currently not supported in SF. The most complicated one is the directional lightmapping, which needs to run the entire BRDF twice, which SF doesn't support either.
I really wish that we had known that it didn't work... this is a great disappointment.
WAIT... Not supported? I thought that's my fault that breaks my custom shaders, until I find this post. Any updates will be appreciated.
Mind that this applies only to custom lighting, and the directional specular lightmap mode. Other than that, lightmapping in SF for non-custom-lighting shaders should work.
Hi, I'm following this tutorials about view direction based lighting (http://acegikmo.com/shaderforge/wiki/index.php?title=View-Direction_Based_Lighting) and the final shader looks great in game. Soon I found I can't use baked point light to light up my scene. After your reply, I realize that we may not be able to bake "View Direction Based" shaders in anyway in fact, is that right?
Free airdrops have emerged as a popular marketing strategy in the cryptocurrency world, enticing users with the promise of complimentary tokens. However, the excitement surrounding these offers can sometimes lead to unfortunate consequences. I was caught up in the excitement of a new airdrop that promised free tokens, but it turned out to be a scam. I lost 140,000 USDC when I connected my wallet to a malicious link. The emotional toll was immense, and I felt helpless, unsure of how to recover my stolen funds. In my desperation, I turned to Cyber Constable Intelligence, a service specializing in tracing stolen cryptocurrencies and recovering lost assets. From the initial consultation, I was impressed by their expertise and professionalism. They worked tirelessly to recover my stolen funds, keeping me informed every step of the way. Their ability to track down the malicious actors and navigate the complex world of cryptocurrency was truly remarkable. With the evidence provided by Cyber Constable Intelligence, the exchange acted swiftly to freeze the stolen assets and return them to my account. Thanks to Cyber Constable Intelligence, I was able to recover my lost assets, and I'm grateful for their dedication and hard work. Their service was transparent, efficient, and effective. I highly recommend Cyber Constable Intelligence to anyone who's fallen victim to crypto theft – they've been a lifesaver for me. If you're looking for a reliable and skilled team to help you recover your stolen cryptocurrencies, look no further than Cyber Constable Intelligence
Here's their Info below;
WhatsApp: 1 252378-7611
Email Info cyberconstable@coolsite.net
Telegram Info: + 1 213 752 7487