-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3D] add support for gl_clipdistance (part 1) #57899
base: master
Are you sure you want to change the base?
Commits on Jul 2, 2024
-
qgsabstractmaterialsettings: Add mapSettings parameter to toMaterial
This is not used at the moment. It will be used in the following commits to define the clip plane equations.
Configuration menu - View commit details
-
Copy full SHA for 268e2f9 - Browse repository at this point
Copy the full SHA 268e2f9View commit details -
qgsphongmaterialsettings: Use default vertex for the constant case
There is no need to define a special vertex shader code for this material, it can use the default case. This way, it reduces the number of vertex shader files.
Configuration menu - View commit details
-
Copy full SHA for bc19fab - Browse repository at this point
Copy the full SHA bc19fabView commit details -
qgsmetalroughmaterial: Move add addDefinesToShaderCode to Qgs3DUtils
This will be used by `QgsPhongMaterialSettings` in the next commit.
Configuration menu - View commit details
-
Copy full SHA for 7ea241f - Browse repository at this point
Copy the full SHA 7ea241fView commit details -
qgsphongmaterialsettings: Merge datadefined and constant cases
This commit makes two changes to `QgsPhongMaterialSettings`: 1. It merges `dataDefinedMaterial()` and `constantColorMaterial` into one new function: `buildMaterial`. 2. The fragment shader files `phongDataDefined.frag` and `phongConstant.frag` are merged into a new file `phong.frag`. This is achieved by a `#define` logic. If `DATA_DEFINED` is defined, this is the dataDefined case. Otherwise, this is the constant case.
Configuration menu - View commit details
-
Copy full SHA for 87dad15 - Browse repository at this point
Copy the full SHA 87dad15View commit details -
qgsgoochmaterialsettings: Merge datadefined and constant cases
This is similar to the previous QgsPhongMaterialSettings change: This commit makes two changes to `QgsGoochMaterialSettings`: 1. It merges `dataDefinedMaterial()` and `constantColorMaterial` into one new function: `buildMaterial`. 2. There is one fragment shader file called `gooch.frag`. This is achieved by a `#define` logic. If `DATA_DEFINED` is defined, this is the dataDefined case. Otherwise, this is the constant case.
Configuration menu - View commit details
-
Copy full SHA for e6d7379 - Browse repository at this point
Copy the full SHA e6d7379View commit details -
qgsphongtexturedmaterialsettings: Use default.vert vertex
There is no need to define a special vertex shader code for this material, it can use the default case. This way, it reduces the number of vertex shader files.
Configuration menu - View commit details
-
Copy full SHA for e51eb79 - Browse repository at this point
Copy the full SHA e51eb79View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1d16c1 - Browse repository at this point
Copy the full SHA c1d16c1View commit details -
3d: Introduce QgsTextureMaterial
This is the same material as the qt3d one: `Qt3DExtras::QTextureMaterial`. It will also be used in the following commits to define the gl_ClipDistance for the textured terrain.
Configuration menu - View commit details
-
Copy full SHA for 34e88e8 - Browse repository at this point
Copy the full SHA 34e88e8View commit details -
3d: Introduce QgsDiffuseSpecularMaterial
This is the same material as the qt3d one: `Qt3DExtras::QgsMaskedTexturedMaterial`. It will also be used in the following commits to define the gl_ClipDistance for the non texture case of the terrain.
Configuration menu - View commit details
-
Copy full SHA for 4be6e52 - Browse repository at this point
Copy the full SHA 4be6e52View commit details -
terrain: use QgsTextureMaterial and QgsDiffuseSpecularMaterial
There is no functional change. It is simply needed to add gl_ClipDistance support to the terrain shaders in the next commits.
Configuration menu - View commit details
-
Copy full SHA for f48b6b4 - Browse repository at this point
Copy the full SHA f48b6b4View commit details -
qgsframegraph: Add clip planes
`Qt3DRender::QClipPlane` enable OpenGL clipping plane that can be used in shaders using gl_ClipDistance. This change adds 4 clipPlane. This will be used to clip the 3dScene at Xmin / Xmax / Ymin / Ymax. This change has no effect at the moment because `gl_ClipDistance` needs to be computed in each vertex or geometry shader file. This will be achieved in the following commits.
Configuration menu - View commit details
-
Copy full SHA for e0b0c65 - Browse repository at this point
Copy the full SHA e0b0c65View commit details
Commits on Jul 12, 2024
-
3d: Add support for gl_ClipDistance in the default vertex shader file
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used. The associated unit test needs to be updated because the objects at the border of the scene are now partially cut.
Configuration menu - View commit details
-
Copy full SHA for 7c161d8 - Browse repository at this point
Copy the full SHA 7c161d8View commit details -
qgsdemterraintileloader: Simplify createTextureComponent signature
All the existing parameters are stored in `Qgs3DMapSettings`. Therefore, `Qgs3DMapSettings` can be directly used.
Configuration menu - View commit details
-
Copy full SHA for d29b940 - Browse repository at this point
Copy the full SHA d29b940View commit details -
qgsdiffusespecularmaterial: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for f39e189 - Browse repository at this point
Copy the full SHA f39e189View commit details -
qgstexturematerial: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for d54610c - Browse repository at this point
Copy the full SHA d54610cView commit details -
phongDataDefined: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for 403762f - Browse repository at this point
Copy the full SHA 403762fView commit details -
goochDataDefined: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for 9f933b4 - Browse repository at this point
Copy the full SHA 9f933b4View commit details -
qgssimplelinematerialsettings: Add support for gl_ClipDistance
This one is a little bit to the other ones. Indeed, lines has a geometry shader with redefine gl_Position. Therefore, gl_ClipDistance needs to be computed in the geometry shader file. With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for f0b289f - Browse repository at this point
Copy the full SHA f0b289fView commit details -
qgsinstancedpoint3d: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for 3ca8205 - Browse repository at this point
Copy the full SHA 3ca8205View commit details -
qgspointcloud3dsymbol: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for e58c189 - Browse repository at this point
Copy the full SHA e58c189View commit details -
qgsmesh3dmaterial: Add support for gl_ClipDistance
This is achieved with two changes: 1. define the plane equation as uniform with the `Qgs3DUtils::addBoundingBoxParametersToEffect` call 2. include `clipplane.inc` file in the vertex shader file and call setClipDistance() With these changes, the planes defined in the framegraph are used.
Configuration menu - View commit details
-
Copy full SHA for 0bb1e81 - Browse repository at this point
Copy the full SHA 0bb1e81View commit details