Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] This is for project 3D point on 2D screen space ?

[DiscordArchive] This is for project 3D point on 2D screen space ?

[DiscordArchive] This is for project 3D point on 2D screen space ?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
11-13-2022, 08:14 PM
#1
Archived author: Intemporel • Posted: 2022-11-13T20:14:31.172000+00:00
Original source

This is for project 3D point on 2D screen space ?
rektbyfaith
11-13-2022, 08:14 PM #1

Archived author: Intemporel • Posted: 2022-11-13T20:14:31.172000+00:00
Original source

This is for project 3D point on 2D screen space ?

rektbyfaith
Administrator
0
11-13-2022, 08:14 PM
#2
Archived author: Kaev • Posted: 2022-11-13T20:14:52.228000+00:00
Original source

clicking on "local windows debugger" to build + debug after build
rektbyfaith
11-13-2022, 08:14 PM #2

Archived author: Kaev • Posted: 2022-11-13T20:14:52.228000+00:00
Original source

clicking on "local windows debugger" to build + debug after build

rektbyfaith
Administrator
0
11-13-2022, 08:15 PM
#3
Archived author: Pursche • Posted: 2022-11-13T20:15:19.310000+00:00
Original source

<@288393324744671232> Yes, like I suggested earlier today :p
rektbyfaith
11-13-2022, 08:15 PM #3

Archived author: Pursche • Posted: 2022-11-13T20:15:19.310000+00:00
Original source

<@288393324744671232> Yes, like I suggested earlier today :p

rektbyfaith
Administrator
0
11-13-2022, 08:15 PM
#4
Archived author: Pursche • Posted: 2022-11-13T20:15:45.409000+00:00
Original source

<@138006906915651585> Correct, the worldspace position of the model, as a vec3
rektbyfaith
11-13-2022, 08:15 PM #4

Archived author: Pursche • Posted: 2022-11-13T20:15:45.409000+00:00
Original source

<@138006906915651585> Correct, the worldspace position of the model, as a vec3

rektbyfaith
Administrator
0
11-13-2022, 08:15 PM
#5
Archived author: Kaev • Posted: 2022-11-13T20:15:48.266000+00:00
Original source

glm::mat4 VPmatrix = projection * view;
glm::vec4 screenPos = glm::vec4(instance->pos, 1.0f) * VPmatrix;
got that
rektbyfaith
11-13-2022, 08:15 PM #5

Archived author: Kaev • Posted: 2022-11-13T20:15:48.266000+00:00
Original source

glm::mat4 VPmatrix = projection * view;
glm::vec4 screenPos = glm::vec4(instance->pos, 1.0f) * VPmatrix;
got that

rektbyfaith
Administrator
0
11-13-2022, 08:16 PM
#6
Archived author: Pursche • Posted: 2022-11-13T20:16:15.525000+00:00
Original source

Give that a try, lets see what it gives us.
rektbyfaith
11-13-2022, 08:16 PM #6

Archived author: Pursche • Posted: 2022-11-13T20:16:15.525000+00:00
Original source

Give that a try, lets see what it gives us.

rektbyfaith
Administrator
0
11-13-2022, 08:18 PM
#7
Archived author: Kaev • Posted: 2022-11-13T20:18:55.290000+00:00
Original source

```
52807 - (World.cpp:3010): [Error] x: 30356.2 z: 31807 y: 9.53674e-07
52807 - (World.cpp:3011): [Error] screen pos x: 31672.1 z: 32217.2 y: -13281.2
```
rektbyfaith
11-13-2022, 08:18 PM #7

Archived author: Kaev • Posted: 2022-11-13T20:18:55.290000+00:00
Original source

```
52807 - (World.cpp:3010): [Error] x: 30356.2 z: 31807 y: 9.53674e-07
52807 - (World.cpp:3011): [Error] screen pos x: 31672.1 z: 32217.2 y: -13281.2
```

rektbyfaith
Administrator
0
11-13-2022, 08:20 PM
#8
Archived author: Kaev • Posted: 2022-11-13T20:20:18.102000+00:00
Original source

I hope nobody will ever ask me what i've done there afterwards
rektbyfaith
11-13-2022, 08:20 PM #8

Archived author: Kaev • Posted: 2022-11-13T20:20:18.102000+00:00
Original source

I hope nobody will ever ask me what i've done there afterwards

rektbyfaith
Administrator
0
11-13-2022, 08:21 PM
#9
Archived author: Pursche • Posted: 2022-11-13T20:21:33.062000+00:00
Original source

Not quite what we're after. Lets divide it by the perspective, screenPos.xyz /= screenPos.w; (this can't be done like this in C++, but it's the result we're after.
rektbyfaith
11-13-2022, 08:21 PM #9

Archived author: Pursche • Posted: 2022-11-13T20:21:33.062000+00:00
Original source

Not quite what we're after. Lets divide it by the perspective, screenPos.xyz /= screenPos.w; (this can't be done like this in C++, but it's the result we're after.

rektbyfaith
Administrator
0
11-13-2022, 08:22 PM
#10
Archived author: Pursche • Posted: 2022-11-13T20:22:11.039000+00:00
Original source

Individually divide the xyz components by w, and then print it again.
rektbyfaith
11-13-2022, 08:22 PM #10

Archived author: Pursche • Posted: 2022-11-13T20:22:11.039000+00:00
Original source

Individually divide the xyz components by w, and then print it again.

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)