-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pixel projection in shaders (PR 1/2) (#2844)
- Loading branch information
1 parent
58a5d2c
commit 0ed3cbb
Showing
32 changed files
with
317 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
# project32 (Shader Module) | ||
|
||
The `project32` shader module is an extension of the `project` shader module that adds some projection utilities. | ||
The `project32` shader module is an extension of the [project](/docs/api-reference/shader-modules/project.md) shader module that adds some projection utilities. | ||
|
||
## GLSL Functions | ||
|
||
### project_position_to_clipspace | ||
|
||
32 bit implementation of the `project_position_to_clipspace` interface. | ||
|
||
`vec4 project_position_to_clipspace(vec3 position, vec2 position64xyLow, vec3 offset)` | ||
|
||
`vec4 project_position_to_clipspace(vec3 position, vec2 position64xyLow, vec3 offset, out vec4 worldPosition)` | ||
```glsl | ||
vec4 project_position_to_clipspace(vec3 position, vec2 position64xyLow, vec3 offset) | ||
vec4 project_position_to_clipspace(vec3 position, vec2 position64xyLow, vec3 offset, out vec4 commonPosition) | ||
``` | ||
|
||
Parameters: | ||
|
||
* `position` - vertex position in the layer's coordinate system. | ||
* `position64xyLow` - always ignored | ||
* `offset` - meter offset from the coordinate | ||
* `worldPosition` - projected position in the world space | ||
* `offset` - offset from the coordinate, in common space | ||
* `commonPosition` - projected position in the common space | ||
|
||
Returns: | ||
Projected position in the clipspace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.