Added: 2 years ago
From: starvald
Views: 7,345
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (6)

Sign In or Sign Up now to post a comment!
  • Nice work I'm gonna give this a shot

  • Thank you for this. You tutorial was very helpful. I did it(my fourth shader) from your explanations only, which was very clear to me.

    Though one question, I can get the lightposition in screen.

    ScreenLightPos.y is working but ScreenLightPos.x has no effect.

    And what is this for:

    float Len = length( DeltaTexCoord );

    I didn't see it in rest of the code.

    Thanks again.

  • you are right! the line of code you mentioned isn't required in the rest of the shader and can be removed. thank you for that hint.

    concerning the second problem: the 2d position of the light is found at the top of the game.cs:

    private Vector2 _LightMapPosition = new Vector2( 0.7f, 0.44f );

    I altered both values and it worked! did you change these parameters?

    nicolas

  • I am not using the c codes but only the hlsl part. I am very new to this.

    ScreenlightPos is the only thing I can alter for light position. I was assuming they were x,y coordinates on ranged between 0 and 1.

    In my tests I couldn't make it shine from top- right ever!

    It is confusing(vectors).

    PS. I have a sunvec vector which I want to bind to ScreenLightPos. (and an eyevec if helps.)

  • I fixed it sort of. I was doing this as a mod for an old game title 'Morrowind'(2001, but with a very much alive community).

    A utility lets us to write post-process shaders for it.

    Currently DoF, SSAO and godrays(thanks to you) are working. If anybody is interested visit Morrowind modding forums on Bethsoft.

    PS. Yeah, I love that game. :)

  • I am glad that I could help you. Best luck for modding your game and thanks for your interest in my shader!

  • Yes, nice job, I am still yet to have a play with these,looks very cool, just hope I can run them on my hardware, should be fine on the 360 though :)

  • Hi starvald,

    Great job on the crepuscular ray. The old one is also impressive, not crappy like you said.

    I read in the description "More details in my tutorial", does this mean you gonna put up one about this at your homepage?

    Also, if you have time, please send me the update soure code of the XNA sun that has crepuscular ray. Thanks a lot and great job.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more