Joseph Parker 475c26be40 painting demo | 2 سال پیش | |
---|---|---|
.vscode | 2 سال پیش | |
src | 2 سال پیش | |
.gitignore | 2 سال پیش | |
Cargo.lock | 2 سال پیش | |
Cargo.toml | 2 سال پیش | |
README.md | 2 سال پیش |
I am attempting to use a shader to render to the canvas texture. I believe you have to use two textures, render the brush strokes to one, then copy it to the other (which was displayed in the first scene)
Offscreen pass
- render quad with "canvas_texture" using painting shader
- renders to "color_img" render texture
Visible pass
- renders full screen "color_img" on quad
Copy "color_img" to "canvas_texture" every frame
I have the two passes set up (started from https://github.com/not-fl3/miniquad/blob/master/examples/offscreen.rs) but both passes are only drawing 1 tri and the cursor axis are all messed up (i had the cursor shader working last night) Unsure where I'm going wrong
Aha ok i had my pipeline VertexAttribute set to Float3 not Float2, now i see both passes on screen
Got painting working, even a smooth brush. Going to backshelf this idea for a spell.