Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. GPU skinning in hardware instead of CPU, so you need a shader. Having that said I think, the model editor default shader should be a skinning shader for everything with bones (would couse less confusion)
  2. Does anyone actually have any parallax quality textures?
  3. Just assign or create a material using the /Shaders/Model/Animation/diffuse.shader and apply to the model and your animation will play.
  4. Why would you use a tesselation material on those? Tesselated materials should only be used with certain care, since it will tesselate and explode your verts along the normals or heigthmap. So for walls (no curved) or other flat single material models yes, otherwise no.
  5. These will crosstalk out of the box: http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitygetkeyvalue-r773 http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitysetkeyvalue-r774
  6. This explains normal mapping pretty well and the diffrent spaces. http://learnopengl.com/#!Advanced-Lighting/Normal-Mapping
  7. It's just converting from [0,1] space to [-1,1] and normalized. It's not doing anything with the texture coordinates.
  8. I opened the mdl in the model editor, assigned the blugrid material to it and changed the shader to /Shaders/Models/Animated/diffuse.shader Clicked the play animation icon and I have a blue walking man with a bit wierd hip movements.
  9. normals should be sampled like this I believe: vec3 normal = normalize(texelFetch(texture3,ivec2(texcoord*buffersize),0).xyz * 2.0f - 1.0f); also Leadwerks assign depth,diffuse,normals to texture0,1,2 default, so you don't really need a lua for the assigning if you use them in this order
  10. Just flip it in a paint editor. Or track down all texcoord usages in the terrain shaders and mulitply it by vec2(1,-1)
  11. in clipmap.shader you can change this to 0.0 to avoid texture scale repeats. #define TERRAIN_LOW_FREQUENCY_BLEND 8.0
  12. Quick and dirty snow filter for the tournament (post effect): #version 400 uniform sampler2DMS texture0; uniform sampler2D texture1; uniform sampler2DMS texture2; uniform bool isbackbuffer; uniform vec2 buffersize; uniform mat4 projectioncameramatrix; uniform vec3 cameraposition; uniform mat3 cameranormalmatrix; out vec4 fragData0; void main(void) { vec2 icoord = vec2(gl_FragCoord.xy/buffersize); if (isbackbuffer) icoord.y = 1.0f - icoord.y; vec4 color = texture(texture1,icoord); vec3 normalView = normalize(texelFetch(texture2, ivec2(icoord*buffersize),0).xyz * 2.0f - 1.0f); normalView = normalize(cameranormalmatrix*normalView); float cdepth = texelFetch(texture0, ivec2(icoord.xy*buffersize),0).r; if (cdepth<1 && normalView.y < .999 ) { color.rgb=mix(color.rgb,vec3(1,1,1.2),clamp(pow(normalView.y,8),0,1)); } fragData0 = color; }
  13. You can't solve this in a shader, the problem is.. the gun is not .. a model.. it's 3 models. Hand, cob, barrel (orso).. I'd do as Josh says, or quickly switch the 3-model gun to a 1-model gun and turn off depth-test when near a wall.
  14. what shadow shader are you using in that material?
  15. Yes this would be handy. It's currently hardcoded in the lighting shader to 10.
  16. Interesting... here are my result on the same test Only fpsplayer,1xDL and terrain 1080p fullscreen: TSize ~ FPS ------------------- 256 ~ 456 512 ~ 440 1024 ~ 425 2048 ~ 400 4096 ~ 190 --- chopped in half
  17. Gtx 950 card... I hope it was cheap. :-) That's hardly an upgrade from 570.. 20% better maybe. Nvidia putting a 9 series to a 50 card should be a crime for false advertising.
  18. shadmar

    2016 Plans

    Like a prefab system?
  19. What happens if you do the zombies mdls only, no prefab with script attached?
  20. Adjusting this one to a lesser vaule should remedy that in water.shader #define SHALLOWRANGE 0.1
  21. Maybe this will help: http://www.leadwerks.com/werkspace/topic/13593-using-a-timer/#entry95170
×
×
  • Create New...