Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Pass sf::vertex to vertex shader
Print
Pages: [
1
]
Author
Topic: Pass sf::vertex to vertex shader (Read 639 times)
0 Members and 1 Guest are viewing this topic.
qualcuno
Newbie
Posts: 4
Pass sf::vertex to vertex shader
«
on:
October 24, 2024, 10:17:55 am »
Hi,
i'm new to making shaders but from my understanding when using raycasting to make light you should pass the collision points of the rays to the vertex shader to make triangles, i just can't understand how.
Sorry for my bad english
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11015
Re: Pass sf::vertex to vertex shader
«
Reply #1 on:
October 29, 2024, 11:16:43 am »
It's a bit the other way around. You can draw the vertex array and rendering using the shader.
window.
draw
(
myVertexArray,
&
shader
)
;
See also the full tutorial on Shaders:
https://www.sfml-dev.org/tutorials/2.6/graphics-shader.php
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Pass sf::vertex to vertex shader
anything