Where is the vertex shader of 3Dtiles?

1. A concise explanation of the problem you're experiencing.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to change the shader to achieve the desired effect, hoping to tell me the source location in how many lines? Best screenshots.

4. The Cesium version you're using, your operating system and browser.
Version: 1.47
I found this ModelUtility. modifyVertexShaderForLogDepth in the source code, but modifying it doesn't do what I want.

I think it depends on the type of data in your 3D Tiles for how it ultimately gets rendered on the screen. For example, this PR (https://github.com/AnalyticalGraphicsInc/cesium/pull/5380) adds support for custom uniforms for point clouds, and you can see if you check the “Files Changed” tab where the code for changing the shader is.

Most of the shaders should be under the Shaders directory (https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Source/Shaders). For glTF models this is where the materials and shaders get constructed (https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Model.js#L4177).

Let me know if this helps!

Hi
  My model is an oblique photographic model, and I want to achieve partial model flattening, so I want to know where the vertex shader for this model is. I found "gl_Position = u_projectionMatrix * position" on line L305 in the processPbrMetallic Roughness file, not sure if it's here.
  Thanks!

在 2018年9月1日星期六 UTC+8上午3:29:18,Omar Shehata写道:

I think it depends on the type of data in your 3D Tiles for how it ultimately gets rendered on the screen. For example, this PR (https://github.com/AnalyticalGraphicsInc/cesium/pull/5380) adds support for custom uniforms for point clouds, and you can see if you check the "Files Changed" tab where the code for changing the shader is.

Most of the shaders should be under the Shaders directory (https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Source/Shaders). For glTF models this is where the materials and shaders get constructed (https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Model.js#L4177).

Let me know if this helps!

On Thursday, August 30, 2018 at 10:22:40 PM UTC-4, shiting...@gmail.com wrote:1. A concise explanation of the problem you're experiencing.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to change the shader to achieve the desired effect, hoping to tell me the source location in how many lines? Best screenshots.

4. The Cesium version you're using, your operating system and browser.
Version: 1.47
I found this ModelUtility. modifyVertexShaderForLogDepth in the source code, but modifying it doesn't do what I want.

Hi
  I've flattened the model, but now I have a new problem. I've marked a point on the tilted photographic model to get the world coordinates. How do I get the local coordinates of this point in the model?

If you mean you have a point in world coordinates, and want to convert that to the model’s local coordinates, take a look at the modelMatrix (https://cesiumjs.org/Cesium/Build/Documentation/Model.html#modelMatrix) which converts from world to model coordinates. Its inverse should allow you to do the transformation you need.

在 2018年9月3日星期一 UTC+8下午3:20:19,shiting...@gmail.com写道:

在 2018年8月31日星期五 UTC+8上午10:22:40,shiting...@gmail.com写道:

1. A concise explanation of the problem you're experiencing.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to change the shader to achieve the desired effect, hoping to tell me the source location in how many lines? Best screenshots.

4. The Cesium version you're using, your operating system and browser.
Version: 1.47
I found this ModelUtility. modifyVertexShaderForLogDepth in the source code, but modifying it doesn't do what I want.

hello,

Now i'm using cesium to flatten the 3d tiles model with glsl program, but i don't konw where put the glsl code and how to call it , can you give me some tips or sample code ? thank you!

For creating custom shaders, you’ll need to write your own custom Appearance. This tutorial has some info on that:

And I think the materials Sandcastle has an example:

Thank you very mush!

But I want to draw a polygon on 3d-tiles model , and the model in the range of the polygon is flattened, is this ok?

Polygons on 3D Tiles in general should work with classification types, see:

I haven’t tried with a custom appearance though. Try it out and let me know how it goes!

Hi, I wonder how do you finish this function. Can you give me some tips or codes?