Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi fluid use 2D light
#4
(05-06-2024, 10:58 AM)seenotevil92 Wrote: I have a 2D game that uses sprites and lighting.

How can I rewrite the rendering to use this obi asset?

You'll need to write an entirely custom fluid shader. You can do this using ShaderGraph, then set the ObiFluidRendererPass's MaterialType property to "Custom" and provide a custom material that uses your shader. See "Custom fluid shaders" at the end of the following page:

http://obi.virtualmethodstudio.com/manua...ering.html

You'll need to sample the 2D light texture in your shader, using the "2D Light Texture" node provided by URP. See: https://docs.unity3d.com/Packages/com.un...ure%20Node

An alternative that doesn't require writing shaders would be to use camera stacking to combine 3D lit meshes - fluid in this case- with 2D lit sprites.
Reply


Messages In This Thread
Obi fluid use 2D light - by seenotevil92 - 05-06-2024, 12:38 AM
RE: Obi fluid use 2D light - by josemendez - 05-06-2024, 07:45 AM
RE: Obi fluid use 2D light - by seenotevil92 - 05-06-2024, 10:58 AM
RE: Obi fluid use 2D light - by josemendez - 05-06-2024, 11:06 AM
RE: Obi fluid use 2D light - by seenotevil92 - 05-06-2024, 11:46 AM