This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
00000001 10000000 | 00000001 10000001 | |
0000001 0000000 | 0000001 0000001 | |
0000001 0000000 | 00000010000001 | |
128 | 129 | |
*/ | |
#include <cstdint> | |
#include <cstring> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float4 PSMain(float4 position : SV_POSITION, float2 uv : TEXCOORD0 ) : SV_Target | |
{ | |
const float cExtinctionFactor = Params.Config.x; | |
const float cDensity = Params.Config.y; | |
const int cNumSamples = Params.Config.z; | |
const float cCutoffDist = Params.Config.w; | |
const float depth = Depth.Sample(PointSampler, uv).r; | |
const float4 vsPos = float4(screen_to_view(Params.Projection, uv, depth), 1.0f); | |
const float distToPos = length(vsPos); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const float EPSILON = 0.0001; | |
// ----- Primitives | |
float sdSphere(vec3 o, float r) | |
{ | |
return length(o) - r; | |
} | |
float sdBox( vec3 p, vec3 b ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's | |
* prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok. | |
* Product and Trade Secret source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2014 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement. | |
* | |
*/ | |
// Math and base include | |
#include <Common/Base/hkBase.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <irrlicht.h> | |
#include <cstdlib> | |
#include <list> | |
using namespace irr; | |
#pragma comment(lib, "Irrlicht.lib") | |
//Havok init | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (cin.fail()) { | |
cin.clear(); | |
cin.ignore(numeric_limits<streamsize>::max(),'\n'); | |
cerr << "Введено некорректное значение."<<"\nВведите угол a: "; | |
cin >> a; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma comment (lib, "dinput8.lib") | |
#pragma comment (lib, "dxguid.lib") | |
#include <dinput.h> | |
#include <windows.h> | |
#include <d3d11.h> | |
#include <d3dx11.h> | |
#include <d3dcompiler.h> | |
#include <xnamath.h> | |
#include "resource.h" | |
#include <D3dx9shape.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------------------------------- | |
// Урок 4. Нормали и простейший свет. Основан на примере из DX SDK (c) Microsoft Corp. | |
//-------------------------------------------------------------------------------------- | |
#include <windows.h> | |
#include <d3d11.h> | |
#include <d3dx11.h> | |
#include <d3dcompiler.h> | |
#include <xnamath.h> | |
#include "resource.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <cstring> | |
#include <cstdlib> | |
#include <sys/stat.h> | |
typedef uint32_t DWORD; | |
typedef uint16_t WORD; |