mehmet Posted January 31, 2019 Posted January 31, 2019 (edited) Hello guys, I need a shader that would follow the cursor. Where to find ? or how to create? Edited January 31, 2019 by mehmet
AncienT Posted January 31, 2019 Posted January 31, 2019 31 minutes ago, mehmet said: Hello guys, I need a shader that would follow the cursor. Where to find ? or how to create? What kind of effect are you looking for?
AncienT Posted January 31, 2019 Posted January 31, 2019 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.
mehmet Posted January 31, 2019 Author Posted January 31, 2019 @AncienT what alternatives do you have?
Investor Posted February 1, 2019 Posted February 1, 2019 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.
Feche1320 Posted February 1, 2019 Posted February 1, 2019 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.
mehmet Posted February 2, 2019 Author Posted February 2, 2019 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
TEDERIs Posted February 3, 2019 Posted February 3, 2019 (edited) 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 February 3, 2019 by TEDERIs 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now