• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Aleksey Alukard

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

110 Neutral

About Aleksey Alukard

  • Rank
    Newbie
  1. Hello, i download programm in this site http://developer.download.nvidia.com/SDK/10/direct3d/samples.html. program Smoke.When I start it swears on Shader.     1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(181,54): warning X3206: implicit truncation of vector type 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(275,9): warning X3206: 'cross': implicit truncation of vector type 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(275,9): warning X3206: 'cross': implicit truncation of vector type 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(281,19): error X4580: emitting a system-interpreted value which is not written in every execution path of the shader 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(285,19): error X4580: emitting a system-interpreted value which is not written in every execution path of the shader 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(281,19): error X4580: emitting a system-interpreted value which is not written in every execution path of the shader 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(285,19): error X4580: emitting a system-interpreted value which is not written in every execution path of the shader 1>d:\Smoke\Direct3D\Source\Smoke\Voxelizer.fx(346,29): There was an error compiling expression i try use other program on this site and all issue Error/ "Unable to start program Lightingd.exe This application has failed to start because the application configuration is incorrect.Review the manifest file for possible errors.Reinstalling the application may fix this problem.For more details,please see the application event log" i think when i fix Errors in "Smoke", program also will give this error. I use Visual Studio 2008 and Microsoft DirectX 10 SDK (June 2010).       Code in Shader Voxelizer.fx     //---------------------------------------------------------------------------------- // File:   Voxelizer.fx // Author: Ignacio Llamas // Email:  sdkfeedback@nvidia.com //  // Copyright (c) 2007 NVIDIA Corporation. All rights reserved. // // TO  THE MAXIMUM  EXTENT PERMITTED  BY APPLICABLE  LAW, THIS SOFTWARE  IS PROVIDED // *AS IS*  AND NVIDIA AND  ITS SUPPLIERS DISCLAIM  ALL WARRANTIES,  EITHER  EXPRESS // OR IMPLIED, INCLUDING, BUT NOT LIMITED  TO, IMPLIED WARRANTIES OF MERCHANTABILITY // AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL  NVIDIA OR ITS SUPPLIERS // BE  LIABLE  FOR  ANY  SPECIAL,  INCIDENTAL,  INDIRECT,  OR  CONSEQUENTIAL DAMAGES // WHATSOEVER (INCLUDING, WITHOUT LIMITATION,  DAMAGES FOR LOSS OF BUSINESS PROFITS, // BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) // ARISING OUT OF THE  USE OF OR INABILITY  TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS // BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. // // //---------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------- // Textures //-------------------------------------------------------------------------------------- Texture2D<uint2>      stencilbufferTex2D; //-------------------------------------------------------------------------------------- // Variables //-------------------------------------------------------------------------------------- float4x4    WorldViewProjection : WORLDVIEWPROJECTION; float2 projSpacePixDim; // the dimensions of a pixel in projection space i.e. (2.0/rtWidth, 2.0/rtHeight) float3 gridDim; float recTimeStep; int sliceIdx;       // index of the slice we want to output into float sliceZ;       // z in the range [-0.5, 0.5] for the slice we are outputting into float velocityMultiplier = 1.0; //if rendering fire we reduce the effect of the mesh on the velocity field to 20% //-------------------------------------------------------------------------------------- // Pipeline State definitions //-------------------------------------------------------------------------------------- // RasterizerState  RasterizerState RS_CullDisabled {   MultiSampleEnable = False;   CullMode = None;   ScissorEnable = true; }; // BlendState BlendState BS_NoBlending {   BlendEnable[0] = false;   RenderTargetWriteMask[0] = 0x0F; }; // DepthStencilState DepthStencilState DSS_NonZeroRule {     DepthEnable = FALSE;     DepthWriteMask = ZERO;          //stencil     StencilEnable = true;     StencilReadMask = 0x00;     StencilWriteMask = 0xFF;     FrontFaceStencilFunc = Always;     FrontFaceStencilPass = Decr;     FrontFaceStencilFail = Keep;     BackFaceStencilFunc = Always;     BackFaceStencilPass = Incr;     BackFaceStencilFail = Keep;      }; DepthStencilState DSS_Disabled {     DepthEnable = FALSE;     DepthWriteMask = ZERO;          //stencil     StencilEnable = FALSE;     StencilReadMask = 0x00;     StencilWriteMask = 0x00; }; //-------------------------------------------------------------------------------------- // Structs //-------------------------------------------------------------------------------------- // For Technique VoxelizeNZ struct VsVoxInput {     float3 Pos          : POSITION; }; struct VsVoxOutput {     float4 Pos        : SV_Position; }; // For technique VoxelizeResolveWithPS struct VsResInput {     float3 Pos          : POSITION;     float3 Tex          : TEXCOORD; }; struct VsResOutput {     float4 Pos          : POSITION;     float3 Tex          : TEXCOORD; }; struct GsResOutput {     float4 Pos          : SV_Position;     float3 Tex          : TEXCOORD;     uint   RTIndex      : SV_RenderTargetArrayIndex; }; // For technique GenVelocityWireframe struct VsGenVelInput {     float3 Pos          : POSITION0;     float3 PrevPos      : POSITION1; }; struct VsGenVelOutput {     float4 Pos        : POSITION;     float3 Velocity     : VELOCITY; }; struct GsGenVelOutput {     float4 Pos        : SV_Position;     float3 Velocity     : VELOCITY;     uint   RTIndex      : SV_RenderTargetArrayIndex; }; struct GsGenVelIntVtx   // Used internally in GS_GENVELOCITY to store    //   the result of an edge-slice intersection {     float2 Pos;     float3 Velocity; }; struct PsGenVelOutput {     float4  Velocity : SV_Target0;     float   Obstacle : SV_Target1; }; //-------------------------------------------------------------------------------------- // Vertex Shaders //-------------------------------------------------------------------------------------- VsVoxOutput VS_VOXELIZE( VsVoxInput input ) {     VsVoxOutput output;     output.Pos = mul( float4(input.Pos,1), WorldViewProjection );     return output; } VsGenVelOutput VS_GENVELOCITY( VsGenVelInput input ) {     VsGenVelOutput output;     float4 gridPos = mul( float4(input.Pos,1), WorldViewProjection );     float4 prevGridPos = mul( float4(input.PrevPos,1), WorldViewProjection );     output.Pos = gridPos;     output.Velocity = (gridPos - prevGridPos) * 0.5f * gridDim * recTimeStep * velocityMultiplier;     // - multiply by 0.5f because these positions are in clip space (-1,1) in each axis,      //   instead of -0.5 to 0.5 (simulation volume space)     // - multiply by gridDim to move to simulation voxel space,      //   which is the space in which velocity is assumed to be in FluidSim.fx     return output; } VsResOutput VS_RESOLVE( VsResInput input ) {     VsResOutput output;     output.Pos = float4(input.Pos,1);     output.Tex = input.Tex;     return output; } //-------------------------------------------------------------------------------------- // Geometry Shaders //-------------------------------------------------------------------------------------- [maxvertexcount (3)] void GS_RESOLVE(triangle VsResOutput input[3], inout TriangleStream<GsResOutput> triStream) {     GsResOutput output;     output.RTIndex = input[0].Tex.z;     for(int v=0; v<3; v++)     {         output.Pos = input[v].Pos;         output.Tex = input[v].Tex;         triStream.Append( output );     }     triStream.RestartStrip( ); } void GetEdgePlaneIntersection( VsGenVelOutput vA, VsGenVelOutput vB, float sliceZ,                                inout GsGenVelIntVtx intersections[2], inout int idx ) {     // Compute intersection point (x,y), interpolated normal (projected onto plane) and velocity     //  float3 P = float3(0, 0, sliceZ);     //  float3 N = float3(0, 0, 1);     //  float t = dot((P - vA.Pos), N) / dot((vB.Pos - vA.Pos), N);     // We can optimize this a bit:     float t = (sliceZ - vA.Pos.z) / (vB.Pos.z - vA.Pos.z);     if( (t < 0) || (t > 1) )         // line-plane intersection is not withing the edge's end-points (A and B)         return;     intersections[idx].Pos = lerp(vA.Pos, vB.Pos, t).xy;     //intersections[idx].Normal = normalize(lerp(vA.Normal, vB.Normal, t).xy);     intersections[idx].Velocity = lerp(vA.Velocity, vB.Velocity, t);     idx++; } // GS_GENVELOCITY: GS that takes as input one triangle (3 vertices) //  and outputs: //      - 0 triangles, if the input triangle doesn't intersect the given slice //      - 2 triangles, if the input triangle intersects the slice, which form a 1-pixel wide quadrilateral //          along the triangle/slice intersection edge [maxvertexcount (4)] void GS_GENVELOCITY(triangle VsGenVelOutput input[3],                               inout TriangleStream<GsGenVelOutput> triStream ) {     GsGenVelOutput output;     output.RTIndex = sliceIdx;     float minZ = min( min(input[0].Pos.z, input[1].Pos.z), input[2].Pos.z);     float maxZ = max( max(input[0].Pos.z, input[1].Pos.z), input[2].Pos.z);     if( (sliceZ < minZ) || (sliceZ > maxZ) )         // this triangle doesn't intersect the slice         return;     GsGenVelIntVtx intersections[2];     for( int i=0; i<2; i++ )     {         intersections[i].Pos = 0;         intersections[i].Velocity = 0;     }     int idx = 0;     if( idx < 2 )         GetEdgePlaneIntersection(input[0], input[1], sliceZ, intersections, idx);     if( idx < 2 )         GetEdgePlaneIntersection(input[1], input[2], sliceZ, intersections, idx);     if( idx < 2 )         GetEdgePlaneIntersection(input[2], input[0], sliceZ, intersections, idx);     if( idx < 2 )         return;     float sqrtOf2 = 1.414; // the diagonal of a pixel     float2 normal = sqrtOf2 * normalize(         cross( (input[1].Pos - input[0].Pos), (input[2].Pos - input[0].Pos)).xy);     for( int ii=0; ii<2; ii++)     {         output.Pos = float4(intersections[ii].Pos, 0, 1);         output.Velocity = intersections[ii].Velocity;         triStream.Append( output );         output.Pos = float4((intersections[ii].Pos + (normal * projSpacePixDim)), 0, 1);         output.Velocity = intersections[ii].Velocity;         triStream.Append( output );     }     triStream.RestartStrip( ); } //-------------------------------------------------------------------------------------- // Pixel Shaders //-------------------------------------------------------------------------------------- float4 PS_RESOLVE( GsResOutput input ) : SV_Target {     if( stencilbufferTex2D.Load(int3(input.Tex.x, input.Tex.y,0)).g )         return 0.5;     return 0; } PsGenVelOutput PS_GENVELOCITY( GsGenVelOutput input ) {     PsGenVelOutput output;     output.Velocity = float4(input.Velocity, 1.0);     output.Obstacle = 1.0;     return output; } //-------------------------------------------------------------------------------------- technique10 VoxelizeNZ {     pass NonZeroRule     {         SetVertexShader( CompileShader(vs_4_0, VS_VOXELIZE()) );         SetGeometryShader( NULL );         SetPixelShader( NULL );         SetRasterizerState( RS_CullDisabled );         SetBlendState( BS_NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );         SetDepthStencilState( DSS_NonZeroRule, 0 );     } } technique10 VoxelizeResolveWithPS {     pass ResolveWithPS     {         SetVertexShader( CompileShader( vs_4_0, VS_RESOLVE()) );         SetGeometryShader ( CompileShader(gs_4_0, GS_RESOLVE()) );         SetPixelShader(CompileShader( ps_4_0, PS_RESOLVE()) );         SetRasterizerState( RS_CullDisabled );         SetBlendState( BS_NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );         SetDepthStencilState( DSS_Disabled, 0 );     } } technique10 GenVelocityWireframe {     pass     {         SetVertexShader( CompileShader( vs_4_0, VS_GENVELOCITY()) );         SetGeometryShader ( CompileShader(gs_4_0, GS_GENVELOCITY()) );         SetPixelShader( CompileShader( ps_4_0, PS_GENVELOCITY()) );         SetRasterizerState( RS_CullDisabled );         SetBlendState( BS_NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );         SetDepthStencilState( DSS_Disabled, 0 );     } }
  2. I started to make a game and stumbled on a shortcoming 13 lesson on creating the text color changes everything works but if there is a texture to add the text is only black could you tell how to make the text color again