Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: updates to get it running with current software #1

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

pointimposters/NdfImposters/.vs/
pointimposters/NdfImposters/x64
pointimposters/NdfImposters/NdfImposterLibary/x64/
pointimposters/NdfImposters/NdfImposterLibraryTests/x64/
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef EXPECTATION_MAXIMIZATION_H_
#define EXPECTATION_MAXIMIZATION_H_
#include <iterator>

#if 1
#include "NdfTree.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props" Condition="Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -64,32 +65,32 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>NdfImposterLibary</RootNamespace>
<ProjectName>NdfImposterLibrary</ProjectName>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -204,22 +205,13 @@
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets" Condition="Exists('..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets')" />
<Import Project="..\packages\LodePNG.1.1.0\build\native\lodepng.targets" Condition="Exists('..\packages\LodePNG.1.1.0\build\native\lodepng.targets')" />
<Import Project="..\packages\glm.0.9.8.4\build\native\glm.targets" Condition="Exists('..\packages\glm.0.9.8.4\build\native\glm.targets')" />
<Import Project="..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets')" />
<Import Project="..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets')" />
<Import Project="..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets" Condition="Exists('..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets')" />
<Import Project="..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets" Condition="Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\LodePNG.1.1.0\build\native\lodepng.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LodePNG.1.1.0\build\native\lodepng.targets'))" />
<Error Condition="!Exists('..\packages\glm.0.9.8.4\build\native\glm.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\glm.0.9.8.4\build\native\glm.targets'))" />
<Error Condition="!Exists('..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets'))" />
<Error Condition="!Exists('..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets'))" />
<Error Condition="!Exists('..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets'))" />
<Error Condition="!Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props'))" />
<Error Condition="!Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "NdfSampler.h"
#include <cmath>

using namespace NdfImposters;

Expand Down
1 change: 1 addition & 0 deletions pointimposters/NdfImposters/NdfImposterLibary/NdfTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <string>

namespace NdfImposters {
template <typename BinType> class NdfTreeLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AntTweakBar" version="1.16.4" targetFramework="native" />
<package id="glm" version="0.9.8.4" targetFramework="native" />
<package id="LodePNG" version="1.1.0" targetFramework="Native" />
<package id="zlib" version="1.2.8.8" targetFramework="native" />
<package id="zlib.redist" version="1.2.8.7" targetFramework="Native" />
<package id="zlib.v120.windesktop.msvcstl.dyn.rt-dyn" version="1.2.8.8" targetFramework="native" />
<package id="zlib.v140.windesktop.msvcstl.dyn.rt-dyn" version="1.2.8.8" targetFramework="native" />
<package id="vcpkg.H.src.vcpkg" version="1.0.0" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <future>
#include <chrono>
#include <forward_list>
#include <algorithm>

#include "FreeImage.h"
#include "region.h"
Expand Down Expand Up @@ -12137,7 +12138,7 @@ void keyboard(unsigned char key, int mx, int my) {
//}
//reset();
maxSamplingRunsFactor /= 2.0f;
maxSamplingRunsFactor = std::max(std::pow(2.f, -64), maxSamplingRunsFactor);
maxSamplingRunsFactor = (std::max<float>)(std::pow(2.f, -64), maxSamplingRunsFactor);
maxSamplingRuns = std::max(1.0*maxSamplingRunsFactor, pow(4, std::floor(current_lod - lodDelta))*maxSamplingRunsFactor);
std::cout << "max sampling runs factor decreased to: " << maxSamplingRunsFactor << std::endl;
std::wcout << "max sampling runs decreased to: " << maxSamplingRuns << std::endl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props" Condition="Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -22,32 +23,32 @@
<ProjectGuid>{C945773A-9EFA-4DAB-AF02-86F71AEBBF63}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>NdfImposterLibraryTests</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -297,26 +298,15 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets" Condition="Exists('..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets')" />
<Import Project="..\packages\AntTweakBar.redist.1.16.3\build\native\AntTweakBar.redist.targets" Condition="Exists('..\packages\AntTweakBar.redist.1.16.3\build\native\AntTweakBar.redist.targets')" />
<Import Project="..\packages\glm.0.9.8.4\build\native\glm.targets" Condition="Exists('..\packages\glm.0.9.8.4\build\native\glm.targets')" />
<Import Project="..\packages\nupengl.core.redist.0.1.0.1\build\native\nupengl.core.redist.targets" Condition="Exists('..\packages\nupengl.core.redist.0.1.0.1\build\native\nupengl.core.redist.targets')" />
<Import Project="..\packages\nupengl.core.0.1.0.1\build\native\nupengl.core.targets" Condition="Exists('..\packages\nupengl.core.0.1.0.1\build\native\nupengl.core.targets')" />
<Import Project="..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets')" />
<Import Project="..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets')" />
<Import Project="..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets" Condition="Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets')" />
<Import Project="..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets" Condition="Exists('..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\AntTweakBar.redist.1.16.3\build\native\AntTweakBar.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AntTweakBar.redist.1.16.3\build\native\AntTweakBar.redist.targets'))" />
<Error Condition="!Exists('..\packages\glm.0.9.8.4\build\native\glm.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\glm.0.9.8.4\build\native\glm.targets'))" />
<Error Condition="!Exists('..\packages\nupengl.core.redist.0.1.0.1\build\native\nupengl.core.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\nupengl.core.redist.0.1.0.1\build\native\nupengl.core.redist.targets'))" />
<Error Condition="!Exists('..\packages\nupengl.core.0.1.0.1\build\native\nupengl.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\nupengl.core.0.1.0.1\build\native\nupengl.core.targets'))" />
<Error Condition="!Exists('..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v120.windesktop.msvcstl.dyn.rt-dyn.targets'))" />
<Error Condition="!Exists('..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.v140.windesktop.msvcstl.dyn.rt-dyn.targets'))" />
<Error Condition="!Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.props'))" />
<Error Condition="!Exists('..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vcpkg.H.src.vcpkg.1.0.0\build\native\vcpkg.H.src.vcpkg.targets'))" />
<Error Condition="!Exists('..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AntTweakBar.1.16.4\build\native\AntTweakBar.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#version 430

uniform vec3 color;
in int gl_PrimitiveID;
layout(location = 0) out vec4 outFragColor;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
uniform mat4 Projection;
uniform mat4 ModelView;

out int gl_PrimitiveID;

layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AntTweakBar" version="1.16.4" targetFramework="native" />
<package id="AntTweakBar.redist" version="1.16.3" targetFramework="Native" />
<package id="glm" version="0.9.8.4" targetFramework="native" />
<package id="nupengl.core" version="0.1.0.1" targetFramework="native" />
<package id="nupengl.core.redist" version="0.1.0.1" targetFramework="native" />
<package id="zlib" version="1.2.8.8" targetFramework="native" />
<package id="zlib.redist" version="1.2.8.7" targetFramework="Native" />
<package id="zlib.v120.windesktop.msvcstl.dyn.rt-dyn" version="1.2.8.8" targetFramework="native" />
<package id="zlib.v140.windesktop.msvcstl.dyn.rt-dyn" version="1.2.8.8" targetFramework="native" />
<package id="vcpkg.H.src.vcpkg" version="1.0.0" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#endif

in int gl_PrimitiveID;
layout(location = 0) out vec4 outFragColor;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ uniform int pointCloudRendering;
uniform vec3 right;
uniform vec3 up;




out int gl_PrimitiveID;

layout(lines_adjacency) in;
layout(triangle_strip, max_vertices = 4) out;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
in vec2 texCoord;
#endif

in int gl_PrimitiveID;
layout(location = 0) out vec4 outFragColor;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
in vec2 texCoord;
#endif

in int gl_PrimitiveID;
layout(location = 0) out vec4 outFragColor;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ uniform vec3 up;
in vec2 rayOffset[1];

out vec2 texCoord;
out int gl_PrimitiveID;

layout(points) in;
layout(triangle_strip, max_vertices = 4) out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ uniform vec3 up;
in vec2 rayOffset[1];

out vec2 texCoord;
out int gl_PrimitiveID;

layout(points) in;
layout(triangle_strip, max_vertices = 4) out;
Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.
Loading