Houge
Member
|
VI depth
Hi,
There is D.textDepth() function that affects Text depth using the shader and VI drawing.
Is it easy to add like the same kind of shader but for VI 2D drawing? Like for VI.line() and VI.rect() and VI.image() (and others)?
(This post was last modified: 04-24-2019 01:09 AM by Houge.)
|
|
04-24-2019 01:09 AM |
|
Esenthel
Administrator
|
RE: VI depth
Hi,
There already are 3D versions of these functions with depth support:
example:
Code:
static void line(C Vec &a, C Vec &b);
static void quad(C Quad &quad);
static void face(C Vtx3DTex &a, C Vtx3DTex &b, C Vtx3DTex &c, C Vtx3DTex &d);
Or are you asking because you want to pass 2D coordinates and force custom depth, instead of using 3D?
|
|
04-28-2019 04:00 AM |
|
Houge
Member
|
RE: VI depth
I want to pass 2D coordinates and force the depth to be able to draw GUI elements with depth, yes.
3D versions won't work here, I tried.
|
|
04-28-2019 04:03 PM |
|
Esenthel
Administrator
|
RE: VI depth
Ok I'll see what I can do
|
|
04-29-2019 08:08 AM |
|
Houge
Member
|
|
04-29-2019 01:01 PM |
|
Esenthel
Administrator
|
RE: VI depth
I've just added new methods:
VI.imageDepth, imagePartDepth
please let me know how they work for you.
Quote:3D versions won't work here, I tried.
Why not?
It should work the same, as long as you pass correct 3D coordinates, in relation to camera.
|
|
05-08-2019 12:30 PM |
|
Houge
Member
|
RE: VI depth
I just thought that thickness of the lines won't be per-pixel aligned, like in 2D drawing.
Shall I use "faces" for filled rectangles?
Let me try that, thank you!
(This post was last modified: 05-09-2019 04:32 AM by Houge.)
|
|
05-09-2019 04:19 AM |
|