Jump to content

Asad Projection Versus Tex Projection


Recommended Posts

Is ASAD slide projection equivalent to texture projection in terms of texture coordinates? I suppose not, since I see differences between projecting textures with uvTextureSOP from light and ASAD slide projection from the same light (I don't mean shading differences). But how to acheive in ASAD the same result as projecting tex from light via UVTexture SOP?

I want to try light projection via own shader as described here:

http://www.odforce.net/wiki/index.php/Ligh...meraProjections

but first I should know where I was wrong in ASAD usage.

thanks,

SYmek.

Link to comment
Share on other sites

Hmmm... I haven't tested it, but I think both methods (ASAD slide projection and UVTexture projection from the light) use the same basic principle to do the projection and should therefore give similar results -- except, of course, for the obvious differences in resolution: the asad light is working at the renderer's current shading rate whereas UVTexture's resolution is tied to the geometry receiving the projection (and the missing bits are interpolated).

BTW, the asad light's projection is *exactly* the one that Jason outlines at the bottom of that wiki page (i.e: toNDC()). Here's the pertinent code fragment lifted verbatim from the asad_light shader:

        // Projector map
        if (slide != "")
        {
            pos = wo_space(Ps); // Transform into space of light
            pos = toNDC(pos);   // Transform into NDC space
            Cl *= texture(slide, pos.x, pos.y, "mode", "decal",
                                               "border", outside);
        }

What differences do you see? Could you post some pics showing the problem?

Link to comment
Share on other sites

I made very simple scene to compare results and I can't see differences actually. Sorry, I should check this before making rumor on the forum. There must be problem in my real scene though, because in simplified example UVTextureSOP IS equal Asad slide projection in terms of coordinates. In my scene they are not. hmmm.... I will try to figure out this puzzle and publish serious results... ;)

"except, of course, for the obvious differences in resolution: the asad light is working at the renderer's current shading rate whereas UVTexture's resolution is tied to the geometry receiving the projection "

you mean that current render resolution is involved in projecting texture via Asad shader? How this can by? No, wait, it's about texture resolution, right? In UVtextureSOP scenario texture is sampled in respect to geometry mircopolygons? and in ASAD shader, one pixel of texture equals one pixel on screen in light space? Does it make any sense? gosh....

SY.

Link to comment
Share on other sites

you mean that current render resolution is involved in projecting texture via Asad shader? How this can by? No, wait, it's about texture resolution, right?

I mean that the granularity of UVTexture's projection is the geometry's points or vertices, whereas for the asad light it is sub-pixels (at the render resolution).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...