Jump to content

Kronos

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Kronos

  1. Hmm that didnt really work. Just get an overall greenish colour on the surface and nothing else. The best I have got so far is using sprite.vert. I can see the texture(s) using that but there is some weird light error going on. it may be unrelated to the shader but when the camera turns in certain direction everything goes white on the surface of the mesh. I am just using a large squashed cube for testing purposes at the moment.
  2. Something I always have in my own programs is the current coordinates of the camera shown on screen so I know whereabouts I am on the map.
  3. Hi, I have finally started looking at shaders. I have made this little thing as a start based on something I found on the internet. This should take four textures, multiply them with alpha textures(red) and then add the results together. The sort of thing one might use for terrain texturing for instance. uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform sampler2D texture3; uniform sampler2D texture4; uniform sampler2D texture5; uniform sampler2D texture6; uniform sampler2D texture7; varying vec4 texCoord; void main() { vec4 alpha1 = texture2D( texture0, texCoord.xy); vec4 alpha2 = texture2D( texture1, texCoord.xy); vec4 alpha3 = texture2D( texture2, texCoord.xy); vec4 alpha4 = texture2D( texture3, texCoord.xy); vec4 tex1 = texture2D( texture4, texCoord.xy * 100.0 ); vec4 tex2 = texture2D( texture5, texCoord.xy * 100.0 ); vec4 tex3 = texture2D( texture6, texCoord.xy * 100.0 ); vec4 tex4 = texture2D( texture7, texCoord.xy * 100.0 ); tex1 *= alpha1.r; tex2 *= alpha2.r; tex3 *= alpha3.r; tex4 *= alpha4.r; vec4 outcolor = tex1+tex2+tex3+tex4; gl_FragColor = outcolor; } My question is what vertex shader (if any) should I use with this. Any other tips would be welcome.
  4. A couple of queries. I want to add my own terrain texture to the list of available textures however just dropping it into the materials\terrain folder doesn't seem to work and it does not appear in the texture list. It is in DDS format. I've tried dropping it into an existing folder and also put it into a new folder. Is there something else I need to do? Whilst mucking about with the driver.lua script in the editor I notice when driving the viper in a tight circle the fps drop from 60 to 30 fps. Any ideas why this might be?
  5. The ability to import and use alphamaps for terrain in the editor. We have a terrain function to load alphamaps so it seems odd to me that the editor does not make use of it and seems to rely on height/angle info only. Many terrain programs use alphamaps eg L3DT.
×
×
  • Create New...