-
Posts
2,285 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by SpiderPig
-
-
It's a bit slow using the geometry shader. FPS drops from 800 to 300. I think compute shaders might help here.
- 1
-
-
-
-
Hmm, actually I don't think my normals are right... I'm multiplying the local vertex positions by a local matrix to rotate the blades but the normals are unchanged. Can I rotate normals by multiplying by the same matrix as I do the vertices?
-
-
Oh, that reminds me. Inside that function in Lighting.glsl, RenderLight() was using the input vertexWorldPosition rather than the argument "position".
RenderLight(lightIndex, material, materialInfo, vertexWorldPosition.xyz, normal, v, NdotV, f_diffuse, f_specular, renderprobes, ibldiffuse, iblspecular);
I thought it should use the argument 'position' seeing as it is passed to it but not sure... I don't know if it's something the user could end up editing in the UserFunction?
-
I'm getting mixed and seemingly random results with the lighting of my grass. The line between light and dark moves with the camera. This is what I'm passing out of my geometry shader to the default PBR fragment shader. The grass is green as I'm setting the vertex color to green. The fragment shader is just doing the lighting. I've looked at the fragment shaders to see what it needed but might have missed something?
layout(location = 25 ) out uint outEntityID; layout(location = 5 ) out flat uint outMaterialID; layout(location = 8 ) out vec4 outVertexPosition; layout(location = 1 ) out vec3 normal; layout(location = 7 ) out vec4 worldPosition; layout(location = 0 ) out vec4 vertexColor;
First it was this;
Now at random it is this;
-
Half my grass was actually below the ground. Now it looks better and I gave it some rough animation. I've also made it that the root of the grass blades are darker. Still needs a lot of work but I'm done for now I think. I can fine tune it later.
- 4
-
Thanks, I didn't think so. I must be passing something wrong.
-
-
-
-
-
Do you mean this?
I don't see how this takes into account making our own shaders though.
-
It makes sense to make everything relative to the executable so we can just define a shader family as "Shaders\MyFamily.json" or "Materials\MyMaterial\MyFamily.json".
-
Okay so I see now it's trying to load it from the shaders folder too... I see what your doing for the standard materials and the shader family's for Ultra but I don't think its a good idea. Ultra needs to be flexible. I want my shaders and textures in one folder. I don't want to split the materials and textures into one and then my custom shaders into another. I think we should be able to define a path because it is, after all, a file.
-
I name my json files .mat and .fam so I can see the difference without having to open them, but it's no big deal. I'll make it work.
-
Hey @Josh just wondering if this is actually a bug or I should change my files to all use .json? Thanks.
-
When it comes time to expand the character controller system, I was thinking it might be good to have it as an expandable system. Like a component where if we wanted too, override key systems of the controller, like gravity, physics and anything else that makes it a controller. I would find that very useful. Just a thought.
- 2
-
Just tried it out, with the skybox removed it still happens on the far wall of the base. It's just a lot harder to tell because the colour difference between the black background and the dark gray wall is very small. If you remove the skybox and make the cameras clear color red or something else bright you will will be able to see it better. I don't think it has anything to do with the terrain or skybox. I think it's something to do with the CSG objects.
I can see in your video it is still occurring too. A few work arounds might be - slowing the cameras rotation speed so that it's less noticeable; or, make a large enclosure for the base that has the same colour as the walls and enable it when the players is inside, so that when it happens it only reveals a similar colour behind the walls rather then the bright skybox / terrain.
- 1
-
Yeah I don't think its the GPU. I've got a GTX 980 TI. Maybe it is the skybox. If you remove it I can test on my PC to verify if that's the issue if you like.
- 1
-
9 hours ago, Yue said:
No, I don't have anything in the scene, only the last image, the error only happens when I have fog, or a terrain, or the sky.
How many CSG objects are there in total? I tried your demo again and saw that other CSG objects out side of the base took time to appear as well. (orange platform) When the walls vanish they show not only the skybox but the other objects behind it too. I tend to think it's just lots of CSG objects. You might be better off making your base one large object in some modelling software. But there might be something else at play, I'm not sure.
-
That looks like the occlusion system to me. I've never used CSG to model a level before. I take it there are a lot of entities in your scene?
Compute Shaders
in General Discussion
Posted
I'd like to try using these now. Is this the way to use them? I found this here.
I couldn't find CreateWorkgroup() in the API though.