• Content count

  • Joined

  • Last visited

Community Reputation

111 Neutral

About drjaydenm

  • Rank
  1. OpenGL Help with CGFX

    Alright, thanks for your help :)
  2. OpenGL Help with CGFX

    I was thinking about using just the Vertex and Fragment programs instead of the whole effect file. Is there any benefit (other than the fact I can use techniques and passes), of using effects instead of the individual programs if I am doing all my state changes in my program code instead of in the effect? I can't think of any reason off the top of my head.   Looks like i'll try using individual programs and see how it goes.
  3. OpenGL Help with CGFX

    Thanks for your advice,   I will take a look at HLSL2GLSL as it does look promising. It is sad though, that CG is not able to output an effect file as DX bytecode and requires you to use their runtime instead of DX's. If it allowed you to do that, it would be an efficient solution to cross platform shaders.
  4. OpenGL Help with CGFX

    Thanks for your help,   I could just do that but I am trying to look for a universal solution where I can take the CGFX effect, compile to the specific rendering API like DX10, save the results as a DX10 effect and then load the DX10 effect at runtime without using the CGFX API to set each parameter and so on.   I could always just compile the effect using CGFX, get all programs in the effect, extract the DX10 data and make a DX10 effect out of that, although I am pretty sure I would lose the information on techniques and parameters.   Any ideas guys?   Thanks.
  5. Hi,   I am making a game engine with multiple rendering interfaces (currently only DX10 and OpenGL 3) and am trying to integrate CGFX into my pipeline. I have looked at the docs for CGFX but cannot seem to find anything that suits my needs.   What I am trying to do is compile a CGFX file to HLSL byte code as I can then just use my DX10Effect class to load the bytecode to a DX10 effect and DX will be happy. Looking at the docs for CGFX it seems I cannot get the DX10 bytecode from a CGFX effect. This means I will have to use CG to do all the effect technique and parameter work instead of DX itself.   Does anyone know if it is possible to get the DX10 bytecode from a CGFX effect?   Thanks.
  6. DDS Loading Into Texture2D

    Thanks for the info, I think I should be able to get it done now. Also, just double checking, is BC3_UNORM the correct format to be using with DXT5?
  7. Hi,   I am creating an engine using C# and SharpDX. To load DDS files, I was originally decoding the file to a R8G8B8A8 format which defeats the purpose of using DDS as it removes all compression. I am now trying to load DXT5 textures into my engine whilst keeping the compression but I am stuck when trying to copy the texture into the Texture2D DX resource. I have the texture format set as BC3_UNORM.   I'm not quite sure what part of the DDS file I am meant to be copying to the resource and whether or not I am meant to be reordering some channels of the file before doing so. I have tried to find documentation online but it seems to be scarce as everyone wants to use helper functions whereas I am trying to avoid using them solely for the task of loading a DDS file.   Any help or insight into what part of the file I am meant to be copying to the Texture2D resource and any modifications I need to perform would be helpful.   Thanks.
  8. Nevermind, after all this time, I realised the sample mask was set to 0, I changed it to 1 and it works fine
  9. Hey all, I've recently been working on a rendering engine in SharpDX using DirectX 10 and I'm having a problem with alpha blending. I don't currently have any rendertargets except for the backbuffer. Basically what is happening is that I have the depthstencil state and rasterizer state set and thats working fine, but when I try to set the alpha blend state, everything dissappears. I have tried various alpha blending settings but no matter what I try, if an alpha blend state is set to the device, nothing is visible. Thanks for any help.
  10. [SlimDX] Drawing Texture

    Normally, you would render a fullscreen quad and then use the pixel shader to apply the texture to it.