Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. I beleive you can just leave out SteamWorks::Initialize() in your code to not have any steam-dependant libs, but not sure.
  2. Yes VS2013 for windows or Code::Blocks for Ubuntu.
  3. In terrain.shader look for : fragData1 = vec4(normal * 0.5 + 0.5, 0.0); //0.0 is specular power
  4. shadmar

    Fog

    Klepto's postprocess fog (not sure if he uploaded it yet)
  5. Should work in any 3.1. Remember to assign this shader to your material.
  6. yes, just replace outcolor = mix(outcolor,texture(texture4,cubecoord),0.5); //mix diffuse with cubemap reflection 50% with outcolor = mix(outcolor,texture(texture4,cubecoord),ex_color.a); //mix diffuse with cubemap reflection based on alpha
  7. 8.1 here, it varys between 900 and 600 fps in debug mode, but it doesn't matter if I move the mouse or not. (seems to be the same)
  8. Cubemap reflection tutorial (mod style).. http://www.leadwerks.com/werkspace/topic/9185-missing-reflection-shader/#entry69734
  9. How to make a reflective cubemap shader 1. Open up diffuse.shader in the shader editor : 2. Click Vertex in the left tab 3. Add under outputs out vec4 ex_vertexposition; 4. Find : vec4 modelvertexposition = entitymatrix_ *.... Add after : ex_vertexposition = modelvertexposition; //we need this position the fragment shader 5. Click Fragment in the left tab 6. Add under Uniforms uniform samplerCube texture4; //cube map for reflection texture from material uniform mat3 cameranormalmatrix; //need normalmatrix from camera for correct reflection in relation to camera rotation uniform vec3 cameraposition; //need camera position so we know the distance from the fragment. (pixel) 7. Add under Inputs in vec4 ex_vertexposition; 8. find : outcolor *= texture(texture0,ex_texcoords0); after add : vec3 cubecoord = reflect( normalize( ex_vertexposition.xyz - cameraposition ) , normalize(cameranormalmatrix * normal).xyz ); //this is industy standard cubecoordinates for reflection.. outcolor = mix(outcolor,texture(texture4,cubecoord),0.5); //mix diffuse with cubemap reflection 50% See that it compiles, save Make material with a diffusemap in texture0 and cubemap in texture4 Result should be like this :
  10. There no fastpath, I started using HLSL (microsoft way) in forward rendering in 2010, just messing around modding shaders. Shaders rely heavily on engine inputs, like specific matrices and attributes. Alltho HLSL and GLSL are somewhat similar (syntax vary abit, float3 in hlsl is vec3 in glsl, saturate in hlsl is clamp in glsl, lerp is mix , hlsl uses mul while glsl just use * ..and so on..) Vertex shaders are computed per vertex while fragment shader are per pixel. I'd think learning forward rendering first would be better since you get a understanding of how lightning works. Leadwerks 3.0 is a forward renderer (start here) or use opengl, Leadwerks 2.X and 3.1 are deferred (where all lighting is done for you in a prepass) Sorry not very helpful, but it is what it is..
  11. Here is 2 million gpu particles (run it in chrome) : http://www.webgl.com/2012/08/webgl-demo-2-million-particles/ And as Micheal says, gpu's are fed, nothing is comin back.
  12. Resaving model in modeleditor removes vertex colors if they exist. Resave this in the model editor: vertex_col3.zip
  13. How do load a workshop item (ie a texture) from code (lua or cpp) ?
  14. I can I publish one now for test? How is it deleted if I regret my workshop item?
  15. I guess, haven't tried, just hide your context camera and show your rearview camera and vice versa, just don't have both active at the same time when render is called.
  16. Just move and rotate your camera prior to the first render and restore the position before context is rendered.
  17. Here is an example for 3.1 in c++ , just compile and run. App.cpp.zip
  18. If shader location is not in the Shaders/ folder and you save material, the shader path is cleared. How to reproduce : 1. Copy a shader to the Materials folder 2. Update any material to use this shader 3. Save Material Shader refrence is now "" in the mat file
  19. You move the camera where you want and call world->render() which renders to a texture using a buffer. You can draw the texture using drawimage or on a 3d object as a texture. There should be a lua example on the wiki somewhere.
  20. Self made prereq script for running RC10 in ubuntu 13.10 (fresh installed from iso), which supports EFI secureboot and all that ****. yes it works! even the menus.. so happy.. Shad. lw1310.sh.zip
×
×
  • Create New...