• Content count

  • Joined

  • Last visited

Community Reputation

162 Neutral

About gomidas

  • Rank

Personal Information

  • Interests
  1. I get something wrong about the setting file I think. public Texture2D T2D_DiffuseMap = "File.png"; public ShaderResourceView textureView; textureView = new ShaderResourceView(device, T2D_DiffuseMap); device.ImmediateContext.PixelShader.SetShaderResource(0, textureView); So will I have a Texture2D array that keeps multiple files diffuse.png and normal.png then I will do it like : new ShaderResourceView(device, TextureData); //diffuse.png and normal.png ??? Then I will modifyshader file. Or I am getting it wrong ? I am asking because there is no source for c#.
  2. alright if unreal engine does it too no problem for me.
  3. I do not know. Seriously I do not know.
  4. IT IS GOD DAMN HARD. I have to study history. I do not have that time. If I use hlsl sided one can I stay away from all of those calculations ? If I do it, will it work same about quality ?
  5. I am trying to add normal map to my project I have an example of a cube: I have normal in my shader I think. Then I set shader resource view for texture (NOT BUMP) device.ImmediateContext.PixelShader.SetShaderResource(0, textureView); device.ImmediateContext.Draw(VerticesCount,0); What should I do to set my normal map or how it is done in dx11 generally example c++?
  6. I want to rotate my camera around the target horizontally and vertically. Example if q-e pressed only horizontally rotated. And when 1-2 pressed vertically rotated around its direction Example Cameraview : public Matrix View { get; set; } public Vector3 eye { get; set; } = new Vector3(0, 0, -5); public Vector3 target { get; set; } = new Vector3(0, 0, 0); public Vector3 Translation = new Vector3(0, 0, 0); View = Matrix.Translation(Translation.X, Translation.Y, Translation.Z)* Matrix.LookAtLH(eye, target, Vector3.UnitY); I think rotation must be based on target point not the camera itself.
  7. var rasterizerStateDescription1 = new RasterizerStateDescription { CullMode =CullMode.Front, FillMode = FillMode.Solid, IsFrontCounterClockwise =true,IsAntialiasedLineEnabled=true, IsMultisampleEnabled=true }; Multisampling must be enabled too.
  8. Culling in SharpDX

    thanks for the answer, I got it and used well. I used it to check edges if one of their triangle is back facing and the other one is front facing. But another question in my mind is : Is it possible to turn back face culling on only single area of the model when mouse over example Draw a virtual circle around mouse (2D coord) and make only that part back face when mouse is moving on model. Just like in the sims series I remember there was something like that. Shortly, that will show whats inside in buildings. If it is possible I will open a new topic. Thank You.
  9. Culling in SharpDX

    can anyone tell what it does if back face culling or front face culling set.
  10. I render it by clearing context.ClearDepthStencilView(depthView, DepthStencilClearFlags.Depth, 1.0f, 0); And also I did it larger but I did those already problem is when I have a mesh backwards front mesh's outline stays backward other mesh here is the result and issue : https://www.youtube.com/watch?v=4bcdfndc3sQ&feature=youtu.be
  11. I am trying to render outline for my mesh. I basicly re-render the mesh without texture and put color. My problem is I want to show the outline topmost. When I clear depthview after rendering outline mesh my outline stays background of target mesh but also background of other meshes. I want to show outline top of other meshes but behind of my target mesh ? Is that possible ? If I clear depthview for mesh and outline at this time my mesh will be top of other meshes which I do not want.
  12. Hmm, I am going to check that thank you very much.
  13. Alright, that would be perfect if there was an example usage about how will I put them inside. Buf for retriving existing cooords I do not have use that I can get correct positions over matrix and pass transformed coords to VertexData instead of it huh ? I think access is for animations (?)
  14. I am using a static vertex buffer. I need to get immediate update of vertex positions how can I achieve that instead re-creating a buffer everytime ? After getting dynamic buffer how will I update positinos ?   Thanks if anyone answer.
  15. I want to select my meshes with mouse on screen. I think I wiil need 2d coords of mesh vertices I use vector4 for it. Is there a simple way to do it ?   CoordinateConverter class         public Vector2 Convert_3Dto2D(Vector3 position, Matrix viewProj, RenderForm_EX form)         {             var project = Vector3.Project(position, 0, 0, form.ClientSize.Width, form.ClientSize.Height, 0, 1, viewProj);             Console.WriteLine(project.X+" "+ project.Y);             return new Vector2(project.X, project.Y);         } Inside RenderLoop if (MEListener.MouseDown) {    var viewProj = Matrix.Multiply(Meshes.MeshCollection[0].ViewLayer.Camera.getView(), proj); for (int _iV = 0; _iV < Meshes.MeshCollection[0].VertexData.Length; _iV++) {      CoordConverter.Convert_3Dto2D((Vector3)Meshes.MeshCollection[0].VertexData[_iV].Position + Meshes.MeshCollection[0].Position, viewProj, form); } } I think I did it correct. When I move mesh I can get still correct result I think. But what happens if I rotate or scale mesh ? For translation I do it like:  So I +add Position of mesh (Vector3)Meshes.MeshCollection[0].VertexData[_iV].Position + Meshes.MeshCollection[0].Position,... What should I Do to get coorect results ?