Jump to content

cpp Get Terrain shader at runtime


Shadoh
 Share

Recommended Posts

Hey guys, I'm trying to get the shader for adjusting plane clipping values at runtime.

When I do:

 

Material* Mat = terrain->GetMaterial();

 

I get a null reference sad.png

 

What's the correct way of doing that?

 

Also, adding the terrain object to the documentation would be awesome ;)

Link to comment
Share on other sites

@shadmar

Yeah, but what actually is a surface? Just a group of vertices? If so, what separates the vertices from one surface from those in another one? Are those just user-defined groups of vertices? So why would a terrain have multiple surfaces ("surface" is defined as an array of 5 within the terrain-class, so this isn't something simply inherited)?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...