b266365cd2 Member Posts: 90 Re: Black Spots in terrain shader solution Reply #10 on: 08-09-2009, 01:09:21 Here is the file: is the mail topicstarter sent me:Hello mate!, here's the shader file for the black spots bug. result = mDebugWindow->Initialize(mDirect3D->GetDevice(), screenWidth, screenHeight, 256, 256); if(!result) { MessageBox(hwnd, L"Could not initialize the debug window bitmap object.", L"Error", MBOK); return false; } // Create the texture shader object. // Load the textures. Note that the brightness here is manually set. result = device->CreateVertexShader(vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), NULL, &mvertexShader); if(FAILED(result)) { return false; } // Create the pixel shader from the buffer. mDetailTexture = new TextureClass; if(!mDetailTexture) { return false; } // Initialize the detail map texture object. Start with the render to texture to render the depth buffer of the terrain to a texture that we can use for the debug window. I am currently using an older patch for now. if(mTimer) { delete mTimer; mTimer = 0; } // Release the terrain object. deviceContext->PSSetConstantBuffers(bufferNumber, 1, &mlightBuffer); // Set the texture resources in the pixel shader.
Last edited: Apr 8, 2013 HaoEver1987, Apr 8, 2013 #34 MadM Joined: Mar 6, 2012 Messages: 9 Hi, I just want to know if I am allowed legally to use these shaders code as source (and also with modifications) within my commercial Unity projects as long as I give them new names ? we have pro licences. This is the only time I have seen an attachment of this type, open in this manner. To Do Exercises. Thank you! . result = deviceContext->Map(mlightBuffer, 0, D3D11MAPWRITEDISCARD, 0, &mappedResource); if(FAILED(result)) { return false; } // Get a pointer to the data in the constant buffer. forsaken Posts: 12,229 March 31 actually you can share the shader if the texture maps remain external, Carrara will ask to browse to them for other users . Last edited: Dec 23, 2015 Aras, Jun 21, 2006 #1 Fattie, rakkarage and twobob like this. for(j=0; j = 0) && ((j-1) >= 0)) { index = ((j-1) * (mterrainHeight-1)) + (i-1); sum[0] += normals[index].x; sum[1] += normals[index].y; sum[2] += normals[index].z; count++; } // Bottom right face. numElements = sizeof(polygonLayout) / sizeof(polygonLayout[0]); // Create the vertex input layout.
Sakberty replied
490 weeks ago