-
Posts
3,618 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by shadmar
-
-
Yeah, I don't think you can seed LE's RNG using this.
-
LE really needs to expose some way to do a real seeding of it's random numbers
Aha..
math.randomseed(Time:Millisecs())
always gives you randoms even in Start().
Seems like Time:Millisecs() returns the system time in milliseconds, not apptime.
http://www.leadwerks.com/werkspace/page/api-reference/_/time/timemillisecs-r496
So there you go.. proper way
- 1
-
You can use this unless you're doing randoms before rendering starts. There will be tiny variations in rendering speed.
first 5 will always be the same since GetSpeed is then 0 after first frame you will have randoms.
function Script:UpdateWorld() math.randomseed(Time:GetSpeed()*43758.5453) for x=0,4,1 do System:Print(math.random()) end System:Print(" ---- ") end
-
No. But you can increase the camera range and have no occlusion culling.
-
.fbx looks fine when imported to LE. (when given a material with skinning shaders)
.mdl file looks wierd on the animation yes.
-
Just add this line at the bottom of the shader to burn red.
if (NoiseV<InvAlpha+0.025) fragData2 = vec4(1.0,0.0,0.0,specular);
0.025 is the width of the burn, 1.0,0.0,0.0,0.0 is the color.
EDIT: it's already in there in the zips above, however after the decal update, materialflags were moved.
- 1
-
Maybe related, but terrain gets really low quality when activating water.
Load up 08-Terrain.map and just turn water on/off to see the change.
Nividia GTX770M
-
This generates clouds in the DayNight.shader
if you change ctime to -ctime they go the opposite way.
vec3 cloud2(float cloudheight,float scale) { vec2 p=vec2(vp.zx/(vp.y))*cloudheight; vec3 c = vec3(.0, .0, .2); c.rgb += vec3(.6, .6, .8) * cloud(p*.3+ctime*.0002,scale)*.5; c.gbr += vec3(.8, .8, 1.) * cloud(p*.2+ctime*.0002,scale)*.1; c.grb += vec3(1., 1., 1.) * cloud(p*.1+ctime*.0002,scale)*1.; return c.rrr; }
-
Steam hiccup from time to time, usually clears if you restart Steam. (kill the boostrapper if it doesn't shut down entirly)
-
Anamorphic lens shader:
- 15
-
Yes, I get this aswell.
-
-
Yes, I think I did a blog aswell.
-
Does other opengl graphic stuff render ok? games etc?
-
lensflare bounce off everything bright:
- 12
-
Here is a nice cull script I've used alot
--optimize scene place objects in viewrange based on their aabb radius. for i=0,world:CountEntities()-1 do if world:GetEntity(i):GetClass()==Object.ModelClass then local aabb=world:GetEntity(i):GetAABB(Entity.GlobalAABB) if aabb and aabb.radius < .1 then world:GetEntity(i):SetViewRange(0) elseif aabb and aabb.radius < 1 then world:GetEntity(i):SetViewRange(1) elseif aabb and aabb.radius < 10 then world:GetEntity(i):SetViewRange(2) elseif aabb and aabb.radius < 20 then world:GetEntity(i):SetViewRange(3) else world:GetEntity(i):SetViewRange(4) end end end
- 1
-
Realtime reflections using dual parabolic env shader (2 extra cameras with the new render to texture)
But there is a caveat..., since I can't hide the reflection object before the render to texture, I have to place the cameras inside the sphere.
So.. it will only work for spheres. Arbitrary geometry would self reflect.
- 5
-
Decals triggered a change in the channels
http://www.leadwerks.com/werkspace/topic/13062-gbuffer-modification-for-decals
-
Found my project, just move the skin with the torso like each loop:
self.skin:SetPosition(self.torso:GetPosition()) --keep AABB inplace.
- 1
- 1
-
ok, I seem to remember that fixed my ragdolls, but I might be wrong. Tru turning off occlusion culling aswell.
-
You have to update the AABB each loop.
--Update the model local and global AABBs so the renderer keeps proper track of it model:UpdateAABB(Entity.LocalAABB) model:UpdateAABB(Entity.GlobalAABB)
-
07-AI map from MyGame shows nothing when shooting.
-
You can recalculate normals with a geometry shader as flat like this: (will override all mesh smoothing)
vec3 edge1 = vertex_position[1].xyz-vertex_position[0].xyz; vec3 edge2 = vertex_position[2].xyz-vertex_position[0].xyz; mat4 nm=transpose((cameramatrix)); vec3 faceNorm = mat3(nm) * normalize(cross(edge2,edge1));
-
Hi, you should be able to use these to detect this:
http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitygetaabb-r169
http://www.leadwerks.com/werkspace/page/api-reference/_/aabb/aabbintersectsaabb-r609
Shaders reflections changes ?
in Game Artwork
Posted
Edit: Josh I think calculation for reflective cubemap is wrong.
line 63 and 64 :