Jump to content

franck22000

Members
  • Posts

    271
  • Joined

  • Last visited

Everything posted by franck22000

  1. Hello Marley i have reported this issue here: http://leadwerks.com/werkspace/index.php?/tracker/issue-78-decals-are-not-working-in-c/ Josh is asking for a compiled example maybe you can provide it ?
  2. That's sound nice Josh, dont forget to take a look at the decals please
  3. franck22000

    GDC wrap up

    I hope that the price will stay low, this one of the greatest things of this engine
  4. Hello Agror, very nice video ! it's good to see some gameplay Looking forward to see more.
  5. Hello chiblue i have some freezes also wtih raycast, but compiling without debug mode ( ctrl + F5 ) in visualc++ is fixing thoses freezes, it's reported here: http://leadwerks.com/werkspace/index.php?app=tracker&showissue=79
  6. Hello Vetal, i think you can write a function that detect change of LOD with this command: http://leadwerks.com/wiki/index.php?title=Models#GetModelDetail
  7. Thanks for your answer Chris, im agree with you, i think that AI programming can be very insteresting and once recast will be in engine we will see a lot of things moving on the screen I have a request for you, as i said in private message, it would be good if you were doing a special project to show a simple recast demo (moving a cube trought a path generated with recast for example) in LW engine in c++ a small visual c++ project would be excellent.
  8. By waiting openGL 4.0, is there any news for OpenGL 3.2 support in leadwerks ? Josh ?
  9. Recast integration in the engine would be awesome Nice work for the AI ! that's a good start !
  10. hum pitty Your SSDO shader will be very good if we can blur the noise texture, can you provide the code required to do that in postfilter.frag shader ? That would be great !
  11. I loose a lot of brighness with your last shader Here is the screen without and with the SSAO.
  12. There is more shader code that fixe some problems in the next pages of this post: http://www.gamedev.n...=25&WhichPage=1 But it's some HLSL shader code... if it can help you .... Good luck with that Also, the creator of this shader give two important informations if you havent read it yet: - View space position is reconstructed from depth using texture coordinates of the fullscreen quad, no frustum corners required. - Depth buffer is expected to be linear. So do not use the opengl one, create your own depth shader.
  13. How to implement that in postfilter.frag ? do you have a code example ?
  14. Thanks josh i hope that you will get working Why those compile errors ?
  15. Hello everyone i found an interesting shader that handle, SSAO and Global Illumination, i tried with my very basic knowledge to get it working in LW Engine but no luck at the moment. Maybe someone can help us with that, and maybe this shader can give some ideas to someone, so i post it here. I hope i will be usefull... Here is the post on the gamedev forums: http://www.gamedev.net/community/forums/topic.asp?topic_id=556187&PageSize=25&WhichPage=1 Here is the GLSL Source code: uniform sampler2D gnormals; uniform sampler2D gdepth; uniform sampler2D gdiffuse; uniform sampler2D grandom; vec3 readNormal(in vec2 coord) { return normalize(texture2D(gnormals, coord).xyz*2.0 - 1.0); } vec3 posFromDepth(vec2 coord){ float d = texture2D(gdepth, coord).r; vec3 tray = mat3x3(gl_ProjectionMatrixInverse)*vec3((coord.x-0.5)*2.0,(coord.y-0.5)*2.0,1.0); return tray*d; } //Ambient Occlusion form factor: float aoFF(in vec3 ddiff,in vec3 cnorm, in float c1, in float c2){ vec3 vv = normalize(ddiff); float rd = length(ddiff); return (1.0-clamp(dot(readNormal(gl_TexCoord[0]+vec2(c1,c2)),-vv),0.0,1.0)) * clamp(dot( cnorm,vv ),0.0,1.0)* (1.0 - 1.0/sqrt(1.0/(rd*rd) + 1.0)); } //GI form factor: float giFF(in vec3 ddiff,in vec3 cnorm, in float c1, in float c2){ vec3 vv = normalize(ddiff); float rd = length(ddiff); return 1.0*clamp(dot(readNormal(gl_TexCoord[0]+vec2(c1,c2)),-vv),0.0,1.0)* clamp(dot( cnorm,vv ),0.0,1.0)/ (rd*rd+1.0); } void main() { //read current normal,position and color. vec3 n = readNormal(gl_TexCoord[0].st); vec3 p = posFromDepth(gl_TexCoord[0].st); vec3 col = texture2D(gdiffuse, gl_TexCoord[0]).rgb; //randomization texture vec2 fres = vec2(800.0/128.0*5,600.0/128.0*5); vec3 random = texture2D(grandom, gl_TexCoord[0].st*fres.xy); random = random*2.0-vec3(1.0); //initialize variables: float ao = 0.0; vec3 gi = vec3(0.0,0.0,0.0); float incx = 1.0/800.0*0.1; float incy = 1.0/600.0*0.1; float pw = incx; float ph = incy; float cdepth = texture2D(gdepth, gl_TexCoord[0]).r; //3 rounds of 8 samples each. for(float i=0.0; i<3.0; ++i) { float npw = (pw+0.0007*random.x)/cdepth; float nph = (ph+0.0007*random.y)/cdepth; vec3 ddiff = posFromDepth(gl_TexCoord[0].st+vec2(npw,nph))-p; vec3 ddiff2 = posFromDepth(gl_TexCoord[0].st+vec2(npw,-nph))-p; vec3 ddiff3 = posFromDepth(gl_TexCoord[0].st+vec2(-npw,nph))-p; vec3 ddiff4 = posFromDepth(gl_TexCoord[0].st+vec2(-npw,-nph))-p; vec3 ddiff5 = posFromDepth(gl_TexCoord[0].st+vec2(0,nph))-p; vec3 ddiff6 = posFromDepth(gl_TexCoord[0].st+vec2(0,-nph))-p; vec3 ddiff7 = posFromDepth(gl_TexCoord[0].st+vec2(npw,0))-p; vec3 ddiff8 = posFromDepth(gl_TexCoord[0].st+vec2(-npw,0))-p; ao+= aoFF(ddiff,n,npw,nph); ao+= aoFF(ddiff2,n,npw,-nph); ao+= aoFF(ddiff3,n,-npw,nph); ao+= aoFF(ddiff4,n,-npw,-nph); ao+= aoFF(ddiff5,n,0,nph); ao+= aoFF(ddiff6,n,0,-nph); ao+= aoFF(ddiff7,n,npw,0); ao+= aoFF(ddiff8,n,-npw,0); gi+= giFF(ddiff,n,npw,nph)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(npw,nph)).rgb; gi+= giFF(ddiff2,n,npw,-nph)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(npw,-nph)).rgb; gi+= giFF(ddiff3,n,-npw,nph)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(-npw,nph)).rgb; gi+= giFF(ddiff4,n,-npw,-nph)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(-npw,-nph)).rgb; gi+= giFF(ddiff5,n,0,nph)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(0,nph)).rgb; gi+= giFF(ddiff6,n,0,-nph)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(0,-nph)).rgb; gi+= giFF(ddiff7,n,npw,0)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(npw,0)).rgb; gi+= giFF(ddiff8,n,-npw,0)*texture2D(gdiffuse, gl_TexCoord[0]+vec2(-npw,0)).rgb; //increase sampling area: pw += incx; ph += incy; } ao/=24.0; gi/=24.0; gl_FragColor = vec4(col-vec3(ao)+gi*5.0,1.0); } Have fun, or not....
  16. How can i get the name of the gmf model file of one object loaded with the class.lua script ? And store this name in the key of the object ? I cant get this working, any help would be great
  17. Very very nice improvements for the editor, nice to see that you are listening the community so well B) Thanks a lot !
  18. Same problems with Applog command on my side
  19. With this feature, vegetations layers will be finally usable
  20. Very nice, clear and professionnal skin I love it !
  21. can you post this example chris ? It can be usefull for the others
×
×
  • Create New...