Sign in to follow this  
mehmet

Shader find or create

Recommended Posts

Hello guys,
 

I need a shader that would follow the cursor. Where to find ? or how to create?

unknown.png

Edited by mehmet

Share this post


Link to post
31 minutes ago, mehmet said:

Hello guys,
 

I need a shader that would follow the cursor. Where to find ? or how to create?

unknown.png

What kind of effect are you looking for?

Share this post


Link to post
3 minutes ago, mehmet said:

@AncienT

Time code: 2:12

 
Honestly I do not know where you can get a shader like that, maybe I have other alternatives but I can not think of anything.

Share this post


Link to post

I was gonna say you could try dxDrawPrimitive for this, but it's no good if you want curved edges, so you probably want a mask shader, perhaps using dxDrawPrimitive to generate the part which follows the cursor. You'll need to use either trianglestrip or trianglefan.

Share this post


Link to post

Just get the cursor position with getCursorPosition, and if it's inside the image, change the image color to pink and you will have that effect.

Share this post


Link to post
On 01/02/2019 at 15:36, Investor said:

I was gonna say you could try dxDrawPrimitive for this, but it's no good if you want curved edges, so you probably want a mask shader, perhaps using dxDrawPrimitive to generate the part which follows the cursor. You'll need to use either trianglestrip or trianglefan.

 

I just have no idea how to implement it in my head. the arrow repeats the cursor

Share this post


Link to post

A simple mask shader should help you. Just create an arrow texture and use it along with the mask shader. An example of this shader you can find at Shader_examples

Edited by TEDERIs
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.