Refactor: GLSL: Cleanup Clip Space vs. NDC Space naming #105423

Closed
Prakhar-Singh-Chouhan wants to merge 15 commits from (deleted):fix#105070 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
4 changed files with 57 additions and 6 deletions
Showing only changes of commit b892fcbe98 - Show all commits

56
CMakeCache.txt Normal file
View File

@ -0,0 +1,56 @@
# This is the CMakeCache file.
Review

This file should not be part of the PR.
I believe you used ccmake . from within the source folder. This generates some files that should not be committed.

This file should not be part of the PR. I believe you used `ccmake .` from within the source folder. This generates some files that should not be committed.
# For build in directory: f:/gsoc/blender
# It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Value Computed by CMake.
CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=F:/gsoc/blender/CMakeFiles/pkgRedirects
########################
# INTERNAL cache entries
########################
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=f:/gsoc/blender
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=26
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=0
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cpack.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake/bin/ctest.exe
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 17 2022
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=F:/gsoc/blender
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/Program Files/CMake/share/cmake-3.26

View File

@ -0,0 +1 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
Review

Same here. this file should not be part of this PR.

Same here. this file should not be part of this PR.

ohhh i'll remove them manually then

ohhh i'll remove them manually then

View File

@ -29,15 +29,12 @@ void main()
GPU_INTEL_VERTEX_SHADER_WORKAROUND
vec3 world_pos = point_object_to_world(pos);
<<<<<<< HEAD
gl_Position = point_world_to_homogenous(world_pos);
fclem marked this conversation as resolved

Here.

Here.
=======
vec3 view_pos = point_world_to_view(world_pos);
gl_Position = point_view_to_ndc(view_pos);
fclem marked this conversation as resolved

You still need to fix the merge errors. This will not compile as point_view_to_ndc does not exist anymore.
You only removed the merge tags, but you need to remove what was below the <<<<<<< HEAD and do the renaming of what was above >>>>>>> main.

You still need to fix the merge errors. This will not compile as `point_view_to_ndc` does not exist anymore. You only removed the merge tags, but you need to remove what was below the `<<<<<<< HEAD` and do the renaming of what was above `>>>>>>> main`.
/* Offset Z position for retopology overlay. */
gl_Position.z += get_homogenous_z_offset(view_pos.z, gl_Position.w, retopologyOffset);
>>>>>>> main
uvec4 m_data = data & uvec4(dataMask);

View File

@ -82,10 +82,8 @@ void main()
vec3 world_pos0 = point_object_to_world(in_pos0);
vec3 world_pos1 = point_object_to_world(in_pos1);
<<<<<<< HEAD
vec4 out_pos0 = point_world_to_homogenous(world_pos0);
fclem marked this conversation as resolved

Here

Here
vec4 out_pos1 = point_world_to_homogenous(world_pos1);
=======
vec3 view_pos0 = point_world_to_view(world_pos0);
fclem marked this conversation as resolved

Same thing here.

Same thing here.
vec3 view_pos1 = point_world_to_view(world_pos1);
vec4 out_pos0 = point_view_to_ndc(view_pos0);
@ -95,7 +93,6 @@ void main()
out_pos0.z += get_homogenous_z_offset(view_pos0.z, out_pos0.w, retopologyOffset);
out_pos1.z += get_homogenous_z_offset(view_pos1.z, out_pos1.w, retopologyOffset);
>>>>>>> main
uvec4 m_data0 = uvec4(in_data0) & uvec4(dataMask);
uvec4 m_data1 = uvec4(in_data1) & uvec4(dataMask);