Skip to content

Instantly share code, notes, and snippets.

// After working on this for a few hours, here is some code to get Physical Material as a struct in c++ (it seems to be missing in the current 3ds max 2020 SDK):
// numbers taken from here: https://help.autodesk.com/view/3DSMAX/2020/ENU/?guid=GUID-57562F6A-A8A1-4A28-BAE1-0D4729411214
#define PHYSICAL_MATERIAL_CLASS_ID Class_ID(1030429932, 3735928833)
struct PhysicalMaterial
{
float anisoangle = 0;
float anisotropy = 0;
float base_weight = 0;
// https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-11-efficient-and-robust-shadow-volumes-using
// GPU Gems 3
// Chapter 11. Efficient and Robust Shadow Volumes Using Hierarchical Occlusion Culling and Geometry Shaders
// Example 11-1. A GLSL Implementation of the Volume Generation Geometry Shader
// By:
// Martin Stich - mental images
// Carsten Wächter - Ulm University
// Alexander Keller - Ulm University
// Copyright by NVIDIA Corporation as it is part of GPU Gems 3
@assaframan
assaframan / gist:5289009
Created April 2, 2013 00:34
The error I had today when cmaking OGRE for NaCl
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGLES3_INCLUDE_DIR (ADVANCED)
used as include directory in directory C:/hg_Code/ogre/trunk/src/RenderSystems/GLES2
@assaframan
assaframan / mincode.cpp
Created November 24, 2012 11:56
min code to render OGRE with d3d11 render system
#include <conio.h>
#include "Ogre.h"
#include "OgreFrameListener.h"
#include "OgreShaderGenerator.h"
/////////////////////////////////////////////////////////////////////////////////////////////////
class ShaderGeneratorTechniqueResolverListener : public Ogre::MaterialManager::Listener
{
public:
@assaframan
assaframan / gist:3079570
Created July 9, 2012 22:54
Get Facebook Friends From ServiceStack Session
public class Friend
{
public String Id { get; set; }
public String Name { get; set; }
};
private class Paging
{
public String next { get; set; }
@assaframan
assaframan / MongoDBAuthRepository.cs
Created June 3, 2012 04:41
This is a MangoDB implementation of ServiceStack's IUserAuthRepository.
//////////////////////////////////
// A more updated version of this code could be found here:
// https://github.com/ServiceStack/ServiceStack.Contrib/blob/master/src/ServiceStack.Authentication.MongoDB/MongoDBAuthRepository.cs
///////////////////
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using ServiceStack.Common;