Announcement

Collapse
No announcement yet.

Light information in Post Proccess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Light information in Post Proccess

    Hey there!

    I'm working on a NPR environment and I would like to have custom shadows. I thought using a Post Proccess with a WorldAlignedTexture would do the trick, but I'm running into a problem: how can I get how 'lit' is a pixel? I know there's nothing like a Light Buffer, but there must be a way to reverse engineer the light using BaseColor and the pixel color.

    Any ideas?
    If you like painting in VR, check out Lienzo - knexator.itch.io/lienzo-vr

    #2
    This sounds to me like it'll need source code access.

    Comment


      #3
      Light function would be good choise.
      Edit: I use this for custom cloud projection shadows.
      Last edited by Kalle-H; 11-06-2015, 05:32 AM.

      Comment


        #4
        Originally posted by mago314 View Post
        Hey there!

        there must be a way to reverse engineer the light using BaseColor and the pixel color.

        Any ideas?
        Yeah, what you just said. PostProcessInput 0 / Base Color = lighting multiplier for that pixel.

        It's how I do it in my cel shader, for instance.

        Comment


          #5
          Yep, that's what I'm doing. I hooked up the output directly to the emissive, and the results are pretty nice, except for the only thing I actually need it for:

          Here's a scene without the Post Proccess:
          Click image for larger version

Name:	HighresScreenshot00003.png
Views:	1
Size:	277.7 KB
ID:	1092732

          Here's the same scene with the Post Proccess:
          Click image for larger version

Name:	Untitled.png
Views:	1
Size:	185.1 KB
ID:	1092733

          As you can see, the black/red texture is completely messed up. Any ideas?
          Attached Files
          If you like painting in VR, check out Lienzo - knexator.itch.io/lienzo-vr

          Comment


            #6
            What are you trying to do, exactly? It looks correct to me; the output is showing just the effects of the light with no coloration.

            Comment


              #7
              Yes, but the red/black square turns completely black, when it should be similar to the panel right above it.
              If you like painting in VR, check out Lienzo - knexator.itch.io/lienzo-vr

              Comment

              Working...
              X