• 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.

Ivona Raszkova

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

103 Neutral

About Ivona Raszkova

  • Rank
    Newbie
  1. Hello, I have similar issue. I made HLSL effect for my XNA game. I am using triplanar texture for my terrain. But result is moving with my model. There is probably some issue in position but I don't know how to fix it. Please help me with this issue. I went from many blogs and forums but I didn't find the solution. here is my HLSL code: [source lang="cpp"]// ------------------------------------------------- // Matrices // ------------------------------------------------- float4x4 matW : World; float4x4 matVI : ViewInverse; float4x4 matWVP : WorldViewProjection; // Lights // ------------------------------------------------- float ambientLightColor; float3 light1Position; float3 light1Color; float3 light2Position; float3 light2Color; float3 lightDirection; // UV Tiles: 0-4 Diffuse textures float2 uv1Tile; float2 uv2Tile; float2 uv3Tile; float2 uv4Tile; // Textures // ------------------------------------------------- texture diffuseTexture1; texture diffuseTexture2; texture diffuseTexture3; texture diffuseTexture4; sampler2D diffuseSampler1 = sampler_state { texture = <diffuseTexture1>; MagFilter = Linear; MinFilter = Linear; MipFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D diffuseSampler2 = sampler_state { texture = <diffuseTexture2>; MagFilter = Linear; MinFilter = Linear; MipFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D diffuseSampler3 = sampler_state { texture = <diffuseTexture3>; MagFilter = Linear; MinFilter = Linear; MipFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D diffuseSampler4 = sampler_state { texture = <diffuseTexture4>; MagFilter = Linear; MinFilter = Linear; MipFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; struct a2v { float4 position : POSITION0; float2 uv0 : TEXCOORD0; float3 normal : NORMAL; float4 inTexWeights : TEXCOORD1; }; struct v2f { float4 hposition : POSITION; float3 lightVec1 : TEXCOORD0; float3 xlightDirection : TEXCOORD1; float4 TextureWeights : TEXCOORD2; float3 Normal : TEXCOORD3; float3 blendFactor : TEXCOORD4; float2 coord1 : TEXCOORD5; float2 coord2 : TEXCOORD6; float2 coord3 : TEXCOORD7; }; float DotProduct(float3 lightPos, float3 pos3D, float3 normal) { float3 lightDir = normalize(pos3D - lightPos); return dot(-lightDir, normal); } v2f TerrainVS(a2v IN) { v2f OUT; OUT.hposition = mul(IN.position, matWVP); OUT.Normal = normalize(mul(IN.normal, matW)); OUT.blendFactor = abs( OUT.Normal.xyz ); OUT.blendFactor = (OUT.blendFactor - 0.2) * 7; OUT.blendFactor = max(OUT.blendFactor, 1); OUT.blendFactor /= (OUT.blendFactor.x + OUT.blendFactor.y + OUT.blendFactor.z ).xxx; OUT.coord1 = OUT.hposition.yz * 0.01 ;//* tex_scale; mXY; OUT.coord2 = OUT.hposition.zx * 0.01;//* tex_scale; mXZ; OUT.coord3 = OUT.hposition.xy * 0.01;//* tex_scale; mYZ; // Light vectors float3 worldPosition = mul(IN.position, matW).xyz; OUT.lightVec1 = light1Position - worldPosition; OUT.xlightDirection.xyz = lightDirection; OUT.TextureWeights = IN.inTexWeights; return OUT; } float4 MultiTexturedPS(v2f IN) : COLOR0 { float4 finalColor; float4 tempColor; float lightingFactor1 = DotProduct(light1Position,IN.lightVec1,IN.Normal); float lightingFactor = saturate(lightingFactor1); lightingFactor *= light1Color; tempColor = tex2D(diffuseSampler1, IN.coord1.xy)* IN.blendFactor.z; tempColor += tex2D(diffuseSampler1, IN.coord2.xy)* IN.blendFactor.x; tempColor += tex2D(diffuseSampler1, IN.coord3.xy)* IN.blendFactor.y; finalColor = tempColor * IN.TextureWeights.x; tempColor = tex2D(diffuseSampler2, IN.coord1.xy)* IN.blendFactor.z; tempColor += tex2D(diffuseSampler2, IN.coord2.xy)* IN.blendFactor.x; tempColor += tex2D(diffuseSampler2, IN.coord3.xy)* IN.blendFactor.y; finalColor += tempColor * IN.TextureWeights.y; tempColor = tex2D(diffuseSampler3, IN.coord1.xy)* IN.blendFactor.z; tempColor += tex2D(diffuseSampler3, IN.coord2.xy)* IN.blendFactor.x; tempColor += tex2D(diffuseSampler3, IN.coord3.xy)* IN.blendFactor.y; finalColor += tempColor * IN.TextureWeights.z; tempColor = tex2D(diffuseSampler4, IN.coord1.xy)* IN.blendFactor.z; tempColor += tex2D(diffuseSampler4, IN.coord2.xy)* IN.blendFactor.x; tempColor += tex2D(diffuseSampler4, IN.coord3.xy)* IN.blendFactor.y; finalColor += tempColor * IN.TextureWeights.w; finalColor *= lightingFactor + ambientLightColor; return finalColor; } technique Terrain { pass p0 { VertexShader = compile vs_2_0 TerrainVS(); PixelShader = compile ps_2_0 MultiTexturedPS(); } } [/source] Here is stored the result. [url="http://www.uloz.to/xeP8UdE/triplanar-avi"]http://www.uloz.to/xeP8UdE/triplanar-avi[/url]