-
April 18th, 2024, 01:08 #11
-
April 18th, 2024, 03:03 #12
light_blend.jpg
Okay. You've convinced me to take another look at it. I may have a solution that meets your needs. It preserves the color in overlapping light areas while ensuring that the light value is represented in at least one color channel. E.g. when full intensity white overlaps with full intensity red, the result is RGB -> 1.0, 0.5, 0.5. (light pink). In the attached image you can see the same lighting in the current version (left) and the new method (right). I'll chat with John about it next week. It would likely be a per image option with existing images set to the old method and new images potentially set to the new method.
-
April 18th, 2024, 04:14 #13
-
April 18th, 2024, 04:39 #14Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
April 18th, 2024, 04:43 #15
Awesome work! Looks good, I think this is pretty much the best of both worlds without messing up either.
-
April 18th, 2024, 05:17 #16
-
April 18th, 2024, 12:16 #17
light_blend_half.jpg
Same lighting as previous example, but the colored lights are at half intensity.
-
April 18th, 2024, 15:06 #18
- Join Date
- Mar 2020
- Location
- Wales, UK
- Posts
- 312
That's certainly an improvement, although it has got some unphysical features still (the arc of paler light through the white light source, for example).
The ideal would still be to do the math in a log space or LAB or HSL colour model to avoid this immediate clipping to white. Maybe even just trying doing the calculations with an inverse gamma transform, then applying the gamma transform again?
https://gmshaders.com/tutorials/tips_and_tricks/
//Useful on textures because they are already gamma-encoded.
vec3 decode = pow(color.rgb, vec3(0.4545));
//Useful with linear gradients or lighting. It should be the last step.
vec3 encode = pow(color.rgb, vec3(2.2));
But that does mean doing computations in float rather than integer which may not possible the way FGU is set up to render, I don't know. I thought Unity always used float for shaders (https://docs.unity3d.com/2020.1/Docu...rformance.html ) but of course I've no idea how you are actually doing the processing.
-
April 18th, 2024, 16:28 #19Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
April 18th, 2024, 17:07 #20
- Join Date
- Mar 2018
- Location
- North Carolina
- Posts
- 28
It does not reflect reality
NVM I was replying to an earlier comment, and see that this is being addressed to correctly show light sources.
Last edited by mlbrown; April 18th, 2024 at 17:10. Reason: Missed some other replies
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks