Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Local texture change

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 yuanxy   Members   

103
Like
0Likes
Like

Posted 07 February 2014 - 01:29 AM

I want to achieve the model of local scaling, and now want to use the zoom partial transparent textures to achieve, but to change the transparency map texture coordinates is not, I think scaling algorithm for digital image processing, do not know how to write effects algorithms

 

HLSL:

//Composite Pass Vertex Shader
v2f VS_Composite(a2v In) 

        v2f Out = (v2f)0; 
         
    Out.texCoord = In.texCoord;        //pass through texture coordinates from channel 1 
        Out.position = mul(In.position, wvp);//transform vert position to homogeneous clip space 
        Out.vNormal  = In.vNormal;
    return Out; 


//Composite Pass Pixel Shader
float4 PS_Composite(v2f In) : COLOR 

        float4 diffuse = tex2D(diffuseMapSampler, In.texCoord.xy);
        In.texCoord.y *=  0.2;
        In.texCoord.x *=  0.2;
        float alphaValue = tex2D(eyeMapAlphaSampler, In.texCoord.xy).r;
        float colorValue = tex2D(eyeMapColorSampler, In.texCoord.xy);

        return diffuse * (1 - alphaValue) + colorValue * alphaValue;






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.