diff --git a/Shader/phong.fsh b/Shader/phong.fsh index 71f4121..67c7679 100644 --- a/Shader/phong.fsh +++ b/Shader/phong.fsh @@ -66,8 +66,12 @@ float sampleDirectionalShadow(sampler2DShadow shadowMap, vec4 shadowCoord) { } float samplePointShadow(samplerCubeShadow shadowMap, vec3 lightDirection) { + float nearPlane = 0.1; + float A = -(farPlane+nearPlane)/(farPlane-nearPlane); + float B = -2*(farPlane*nearPlane)/(farPlane - nearPlane); + float compValue = 0.5*(-A*length(lightDirection) + B)/length(lightDirection) + 0.5; float bias = 0.005; - return texture(shadowMap, vec4(lightDirection.xyz , length(lightDirection) - bias)); + return texture(shadowMap, vec4(lightDirection.xyz , compValue - bias)); } float distanceToBorder(vec2 vector) { diff --git a/camera.cc b/camera.cc index 631e3bf..c9430e5 100644 --- a/camera.cc +++ b/camera.cc @@ -48,8 +48,8 @@ void Camera::updateRotation(glm::vec2 rotation) { } void Camera:: updateDistance(float distance) { - if (this->distance + distance <= 1.0f) { - this->distance = 1.0f; + if (this->distance + distance <= 2.5f) { + this->distance = 2.5f; } else if (this->distance + distance >= 30.0f) { this->distance = 30.f; diff --git a/level.cc b/level.cc index 5ed0edb..bf1b7ba 100644 --- a/level.cc +++ b/level.cc @@ -429,7 +429,7 @@ void Level::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass, glm::mat4* viewProjectionMatrix, std::vector* shadowVPs) { for(unsigned int i = 0; irender(shader, lightingPass, viewProjectionMatrix, shadowVPs); } } diff --git a/slides/images/demo_m3.png b/slides/images/demo_m3.png new file mode 100644 index 0000000..526b46e Binary files /dev/null and b/slides/images/demo_m3.png differ diff --git a/slides/slides_m3.pdf b/slides/slides_m3.pdf new file mode 100644 index 0000000..868362f Binary files /dev/null and b/slides/slides_m3.pdf differ diff --git a/slides/slides_m3.tex b/slides/slides_m3.tex new file mode 100755 index 0000000..f1e6544 --- /dev/null +++ b/slides/slides_m3.tex @@ -0,0 +1,125 @@ +%*****************************************************************************% +% This LaTeX-Template is based on the beamer package: % +% http://latex-beamer.sourceforge.net % +% % +% For further details on how to create beamer slides you can check their % +% documentation: % +% http://mirror.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf % +% % +% The layout fits the current standard of the acg color scheme. % +% Version: 1.0 % +% Authors: Lars Krecklau % +%*****************************************************************************% +\documentclass{beamer} + +\usepackage{graphicx} +\usepackage[german]{babel} + +% Place in these lines your title and the author's names: +\newcommand{\myTitle}{Milestone 3 - Marble Race Game - Group C} +\newcommand{\myAutors}{Fabian Klemp, Steffen F\"undgens, Simon Froitzheim, Jasper Manousek} +\newcommand{\myAutorsFoot}{\myAutors} + +% If you want to draw images by latex: +% http://www.texample.net/tikz/ +\usepackage{tikz} +\usetikzlibrary{arrows,shapes} + +% Apply the acg layout +\include{layoutacg} + +% Setup the title page +\title{\myTitle} +\author{\myAutors} +\institute{RWTH Aachen University} +\date{\today} +\subject{\myTitle} + +\begin{document} + +\begin{frame} + \titlepage +\end{frame} + +\section{\myTitle} + +\subsection{Steffen} + +\begin{frame} + \begin{itemize} + \item Triggers: + \begin{itemize} + \item Trigger Scripts are now written in Lua + \item No more hardcoded trigger events + \item Could be changed at runtime + \end{itemize} + \uncover<2->{Converter + \begin{itemize} + \item Added various features +\end{itemize}} + \uncover<3->{ Future Work: + \begin{itemize} + \item Debug Converter + \item Implement a seperate loading thread (split up level and only load closest stuff) +\end{itemize}} + \end{itemize} +\end{frame} + +\subsection{Japser} + +\begin{frame} + \begin{itemize} + \item Physics: + \begin{itemize} + \item Added spring constraints (can be used by Doors and Buttons for example) + \item Implemented collision masks + \item General collision fixes + \end{itemize} + \uncover<2->{ Future Work: + \begin{itemize} + \item Make Physics more roboust + \item Camera collision(already started) +\end{itemize}} + \end{itemize} +\end{frame} + +\subsection{Simon} +\begin{frame} + \begin{itemize} + \item Level Design: + \begin{itemize} + \item Worked on our own heightmap + \item Added a bridge to our level + \end{itemize} + \uncover<2->{ Future Work: + \begin{itemize} + \item Finish the level +\end{itemize}} + \end{itemize} +\end{frame} + +\subsection{Fabian} + +\begin{frame} + \begin{itemize} + \item Graphics: + \begin{itemize} + \item \grqq{Improved}\grqq{} shadows + \item Removed cascaded shadow mapping + \item Improved point light shadows(see demo) + \end{itemize} + \uncover<2->{ Future Work: + \begin{itemize} + \item Finish working on shadows + \item Implement bump mapping + \item Particle Systems + \item (Screen Space Ambient Occlusion) +\end{itemize}} + \end{itemize} +\end{frame} +\subsection{Demo} +\begin{frame} + \includegraphics[width=11cm]{images/demo_m3} +\end{frame} + +\end{document}