About Store Forum Documentation Contact
Donations:
364$/mo



Post Reply 
VI depth
Author Message
Houge Offline
Silver Supporter

Post: #1
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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
Find all posts by this user Quote this message in a reply
Houge Offline
Silver Supporter

Post: #3
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: VI depth
Ok I'll see what I can do
04-29-2019 08:08 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Silver Supporter

Post: #5
RE: VI depth
Thanks!
04-29-2019 01:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
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
Find all posts by this user Quote this message in a reply
Houge Offline
Silver Supporter

Post: #7
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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply