The document discusses experimenting with shaders in XNA game development. It describes replacing code in an HLSL file to output vertex color values directly from position data. This avoids color clipping issues. It also discusses passing unclipped position data to the pixel shader and interpolating color values properly. Examples of other shader techniques are briefly mentioned like texturing, lighting, shadow mapping, and post-processing effects.
This document provides an overview of shaders in XNA game development. It discusses what shaders are and how they allow developers to program graphics pipelines rather than relying on fixed function pipelines. It also covers HLSL (High Level Shader Language) and how to define vertex formats, vertex shaders, and techniques in HLSL code files to render 3D objects with customized shaders. Specific topics covered include declaring effects, loading shader files, using techniques and passes, defining a custom vertex format structure, and writing a simple vertex shader to render colored triangles.
XNA L04–Primitives, IndexBuffer and VertexBufferMohammad Shaker
This document discusses drawing 3D primitives and using vertex and index buffers in XNA game development. It begins with an overview of different primitive types like points, lines, and triangles. It then covers drawing triangles by defining vertex positions and colors. Next, it demonstrates creating a rotating tetrahedron using triangle lists. The document concludes by explaining how to create an icosahedron mesh using vertex and index buffers to store vertex data more efficiently for rendering. Key steps include generating vertex and index data, creating vertex and index buffers, and drawing indexed triangles.
Collision detection determines whether two objects in a virtual world overlap and have collided. Accurate collision detection is fundamental to a solid game engine. XNA has two main types for implementing collision detection: bounding boxes and bounding spheres. Bounding boxes are better for rectangular objects while bounding spheres offer a better fit for rounded objects. Both bounding boxes and bounding spheres can be used to check for intersections and containment between game objects.
The document discusses using 3D models, textures, lighting, fog, and animation in XNA game development. It explains how to load 3D models, apply the BasicEffect to set textures, lighting properties, and fog. It also demonstrates how to create simple animation by updating the model's position over time in the game's update loop and applying the transformation to the world matrix.
The document discusses 3D matrix transformations in XNA game development. It explains that to render a 3D scene, a camera matrix, projection matrix, and separate world matrix for each object must be set up. It provides details on creating view matrices with CreateLookAt, projection matrices with CreatePerspectiveFieldOfView or CreateOrthographic, and transforming objects using world matrices created from scaling, rotation, translation and other transformations. Multiple transformations can be combined by multiplying the matrices together in order.
The document discusses deferred lighting, ellipsoidal light shadows, and a screen-space material system. It describes how deferred lighting detaches lighting from scene complexity by rendering geometry to buffers and then lighting the scene many times. It also explains how ellipsoidal light shadows are rendered to cube shadow maps using geometry shaders and various culling techniques. Finally, it summarizes an approach to applying materials like skin and hair in screen-space through blurred passes rather than per-object.
- The document introduces real-time shaders for artists working in Softimage and discusses three key hurdles for understanding shaders: 1) dot products and shading calculations, 2) normal mapping and environment mapping, and 3) shader blending techniques.
- It provides examples of shader code to illustrate dot products, normal mapping, and blurring textures.
- The goal is to help artists understand and use shaders through a tutorial on basic shader concepts and translating shader logic into Softimage.
This document provides an overview of shaders in XNA game development. It discusses what shaders are and how they allow developers to program graphics pipelines rather than relying on fixed function pipelines. It also covers HLSL (High Level Shader Language) and how to define vertex formats, vertex shaders, and techniques in HLSL code files to render 3D objects with customized shaders. Specific topics covered include declaring effects, loading shader files, using techniques and passes, defining a custom vertex format structure, and writing a simple vertex shader to render colored triangles.
XNA L04–Primitives, IndexBuffer and VertexBufferMohammad Shaker
This document discusses drawing 3D primitives and using vertex and index buffers in XNA game development. It begins with an overview of different primitive types like points, lines, and triangles. It then covers drawing triangles by defining vertex positions and colors. Next, it demonstrates creating a rotating tetrahedron using triangle lists. The document concludes by explaining how to create an icosahedron mesh using vertex and index buffers to store vertex data more efficiently for rendering. Key steps include generating vertex and index data, creating vertex and index buffers, and drawing indexed triangles.
Collision detection determines whether two objects in a virtual world overlap and have collided. Accurate collision detection is fundamental to a solid game engine. XNA has two main types for implementing collision detection: bounding boxes and bounding spheres. Bounding boxes are better for rectangular objects while bounding spheres offer a better fit for rounded objects. Both bounding boxes and bounding spheres can be used to check for intersections and containment between game objects.
The document discusses using 3D models, textures, lighting, fog, and animation in XNA game development. It explains how to load 3D models, apply the BasicEffect to set textures, lighting properties, and fog. It also demonstrates how to create simple animation by updating the model's position over time in the game's update loop and applying the transformation to the world matrix.
The document discusses 3D matrix transformations in XNA game development. It explains that to render a 3D scene, a camera matrix, projection matrix, and separate world matrix for each object must be set up. It provides details on creating view matrices with CreateLookAt, projection matrices with CreatePerspectiveFieldOfView or CreateOrthographic, and transforming objects using world matrices created from scaling, rotation, translation and other transformations. Multiple transformations can be combined by multiplying the matrices together in order.
The document discusses deferred lighting, ellipsoidal light shadows, and a screen-space material system. It describes how deferred lighting detaches lighting from scene complexity by rendering geometry to buffers and then lighting the scene many times. It also explains how ellipsoidal light shadows are rendered to cube shadow maps using geometry shaders and various culling techniques. Finally, it summarizes an approach to applying materials like skin and hair in screen-space through blurred passes rather than per-object.
- The document introduces real-time shaders for artists working in Softimage and discusses three key hurdles for understanding shaders: 1) dot products and shading calculations, 2) normal mapping and environment mapping, and 3) shader blending techniques.
- It provides examples of shader code to illustrate dot products, normal mapping, and blurring textures.
- The goal is to help artists understand and use shaders through a tutorial on basic shader concepts and translating shader logic into Softimage.
This document discusses using graphics to teach core Python concepts. It describes some challenges in using graphics APIs that are too complex or produce trivial results. Some solutions proposed are wrapping graphics APIs to simplify them, reusing code through classes, and using simple algorithms that generate complex patterns. Examples provided include using the POV-Ray and PIL libraries to generate 3D shapes and fractal images, as well as cellular automata with Tkinter. The goal is to focus on core Python concepts while producing interesting visual results.
This document discusses Python comprehensions including list, set, and dictionary comprehensions. List comprehensions allow converting iterable objects from one format to another in a concise way. Set and dictionary comprehensions also allow creating sets and dictionaries from iterable objects. Examples are provided to demonstrate converting a list of strings to integers, filtering a list based on a condition, creating a set of authors from a list of books, and creating a dictionary of book titles mapped to book details. Comprehensions provide a powerful and Pythonic way to transform and filter iterable objects.
You probably can't imagine that Monoids (not monads) are so simple maths creatures that you can understand them in just a few minutes.
You probably can't imagine that Monoids (not monads) are so simple maths creatures that you can understand them in just a few minutes.
But you probably don't imagine either that they can help you craft elegant and powerful domain models that scale very well.
Through various examples, we will have a closer look at monoids used for domain modeling in a style that mixes the best of DDD and FP. Even in languages like Java or C#, this talk will influence your coding style forever!
'More entertaining and educational explanation of Monoids I've heard' - Martin Thompson, DDD exchange London 2014.
See more at http://skillsmatter.com/conferences/1880-ddd-exchange-nyc-2014#program
The document discusses TypeScript modules. It begins by showing how to organize validators into a single file module. It then demonstrates splitting the module across multiple files by creating LettersOnlyValidator.ts and ZipCodeValidator.ts files that both reference a Validation.ts file and export classes that implement the module's interface. This allows validators to be modularized while splitting code across separate files.
TypeScript provides basic types like Boolean, Number, String, Array, Enum, Any, and Void to define the type of a variable. It allows defining interfaces to describe the shape of an object and ensure variables match the expected structure. Classes can be created that implement interfaces, support inheritance, and use public/private modifiers. Accessors can be used to control read/write access to class properties. Static properties exist on the class level rather than instance level. Classes can also be defined using constructor functions for additional flexibility.
This document contains notes from a coding workshop. It introduces students to Processing, an open-source programming language and environment used for creating visuals and graphics. It provides examples of basic Processing code for shapes, colors, and coordinates. Students are given exercises to practice drawing in Processing, such as creating a face using ellipses and rectangles. The document concludes by assigning homework for students to find patterns in the real world and read an interview about algorithms.
Intro to Python for High School Students.
Unit #2: classes, as well as docstrings, lambda, map, filter, logging, testing, debugging
Does not include GUI content
Introduces the functional programming ideas of Functor, Apply, Applicative And Monad. Shows how to implement each in Scala with Scalaz and how to validate the implementation using property based test using specs2 and scalacheck.
Game of Life - Polyglot FP - Haskell, Scala, Unison - Part 2 - with minor cor...Philip Schwarz
The document discusses factoring effects out of impure procedures in Scala. It shows an example of a contest function that originally coupled the logic for computing the winner with printing the output. This was refactored to separate the pure winner logic into its own function, while the contest function now handles just calling winner and printing the result. This illustrates a general technique of factoring an impure procedure into a pure core function and separate input/output handling functions to isolate the side effects.
This document discusses monad transformers in Scala. It begins by introducing the OptionT monad transformer, which lifts an Option into a monad M. It defines the point and map methods for OptionT to make it an instance of the Monad type class. Later sections discuss using monad transformers to compose monads like IO and Option that normally do not compose, and how this allows embedding domain-specific languages within programs.
Some languages, like SML, Haskell, and Scala, have built-in support for pattern matching, which is a generic way of branching based on the structure of data.
While not without its drawbacks, pattern matching can help eliminate a lot of boilerplate, and it's often cited as a reason why functional programming languages are so concise.
In this talk, John A. De Goes talks about the differences between built-in patterns, and so-called first-class patterns (which are "do-it-yourself" patterns implemented using other language features).
Unlike built-in patterns, first-class patterns aren't magical, so you can store them in variables and combine them in lots of interesting ways that aren't always possible with built-in patterns. In addition, almost every programming language can support first-class patterns (albeit with differing levels of effort and type-safety).
During the talk, you'll watch as a mini-pattern matching library is developed, and have the opportunity to follow along and build your own pattern matching library in the language of your choice.
Quark: A Purely-Functional Scala DSL for Data Processing & AnalyticsJohn De Goes
Quark is a new Scala DSL for data processing and analytics that runs on top of the Quasar Analytics compiler. Quark is adept at processing semi-structured data and compiles query plans to operations that run entirely inside a target data source. In this presentation, John A. De Goes provides an overview of the open source library, showing several use cases in data processing and analytics. John also demonstrates a powerful technique that every developer can use to create their own purely-functional, type-safe DSLs in the Scala programming language.
Introduction to functional programming using Ocamlpramode_ce
The document provides an introduction to functional programming concepts using Ocaml as the teaching language. It outlines the workshop plan which will cover Ocaml syntax, important functional programming concepts, and understanding the functional paradigm through Ocaml. It then discusses Ocaml background, where Ocaml is used, the Ocaml REPL, function definition, type inference, recursion, tail calls and TCO, higher order functions, algebraic data types, pattern matching, immutability, and more.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
Drawing graphics in C++.NET requires:
1. Creating a Pen object to define the line/shape color and thickness.
2. Getting a Graphics object from the control to draw on using CreateGraphics().
3. Calling DrawLine() or other drawing methods on the Graphics object, passing the Pen and point coordinates.
This document describes a presentation on using the Tagless Final style in the Play Framework for purely functional programming.
The presentation introduces Play Framework and how it uses Google Guice for dependency injection. It discusses separating the program from its execution using techniques like the Reader Monad and Free Monad. However, these have drawbacks like being difficult to use with multiple dependencies.
The presentation then introduces Tagless Final style as an alternative that has less boilerplate than Free Monad and allows separating program and implementation. It demonstrates a basic example of a UserRepository trait and implementation.
The rest of the agenda covers practicing Tagless Final style in the Play Framework, discussing its advantages but also that it is not a silver bullet
The document discusses the Fantom programming language, describing its features such as static typing with dynamic abilities, built-in modularity, and support for concurrency through message passing and immutable objects. It also provides brief biographies of the speakers and an overview of key concepts in Fantom like pods, classes, mixins, and serialization.
This document provides an introduction to event-driven programming and forms using Delphi. It discusses various controls that can be used in forms like labels, edits, combo boxes, check boxes, group boxes, radio buttons, radio groups, and list boxes. It provides examples of how to use these controls and their properties. Tips are also provided like using auto-completion, differentiating between control properties, and changing the application icon. Functions for manipulating strings are also listed.
The document discusses various web technologies including HTML5, CSS, JavaScript, jQuery, ASP.NET, MVC pattern, and more. It provides an overview of each topic with definitions and examples. It also includes a brief history and future directions of web standards.
Utilizing Kinect Control for a More Immersive Interaction with 3D EnvironmentMohammad Shaker
Utilizing Kinect Control for a More Immersive Interaction with 3D Environment. Implemented by Saed Haj Ali, Kinda Tarboush and Marah Halawah and Supervised by me, Dr. Noor Shaker and Dr. Ammar Joukhadar.
The document discusses object cloning in C# programming. It explains shallow cloning versus deep cloning and demonstrates different approaches to cloning objects, including using the ICloneable interface and MemberwiseClone() method. It notes issues with these approaches. The fastest way to do a deep clone, it states, is to serialize an object to a stream and then deserialize it back, which performs a full deep copy. Code is provided to implement this serialization/deserialization cloning approach.
This document discusses using graphics to teach core Python concepts. It describes some challenges in using graphics APIs that are too complex or produce trivial results. Some solutions proposed are wrapping graphics APIs to simplify them, reusing code through classes, and using simple algorithms that generate complex patterns. Examples provided include using the POV-Ray and PIL libraries to generate 3D shapes and fractal images, as well as cellular automata with Tkinter. The goal is to focus on core Python concepts while producing interesting visual results.
This document discusses Python comprehensions including list, set, and dictionary comprehensions. List comprehensions allow converting iterable objects from one format to another in a concise way. Set and dictionary comprehensions also allow creating sets and dictionaries from iterable objects. Examples are provided to demonstrate converting a list of strings to integers, filtering a list based on a condition, creating a set of authors from a list of books, and creating a dictionary of book titles mapped to book details. Comprehensions provide a powerful and Pythonic way to transform and filter iterable objects.
You probably can't imagine that Monoids (not monads) are so simple maths creatures that you can understand them in just a few minutes.
You probably can't imagine that Monoids (not monads) are so simple maths creatures that you can understand them in just a few minutes.
But you probably don't imagine either that they can help you craft elegant and powerful domain models that scale very well.
Through various examples, we will have a closer look at monoids used for domain modeling in a style that mixes the best of DDD and FP. Even in languages like Java or C#, this talk will influence your coding style forever!
'More entertaining and educational explanation of Monoids I've heard' - Martin Thompson, DDD exchange London 2014.
See more at http://skillsmatter.com/conferences/1880-ddd-exchange-nyc-2014#program
The document discusses TypeScript modules. It begins by showing how to organize validators into a single file module. It then demonstrates splitting the module across multiple files by creating LettersOnlyValidator.ts and ZipCodeValidator.ts files that both reference a Validation.ts file and export classes that implement the module's interface. This allows validators to be modularized while splitting code across separate files.
TypeScript provides basic types like Boolean, Number, String, Array, Enum, Any, and Void to define the type of a variable. It allows defining interfaces to describe the shape of an object and ensure variables match the expected structure. Classes can be created that implement interfaces, support inheritance, and use public/private modifiers. Accessors can be used to control read/write access to class properties. Static properties exist on the class level rather than instance level. Classes can also be defined using constructor functions for additional flexibility.
This document contains notes from a coding workshop. It introduces students to Processing, an open-source programming language and environment used for creating visuals and graphics. It provides examples of basic Processing code for shapes, colors, and coordinates. Students are given exercises to practice drawing in Processing, such as creating a face using ellipses and rectangles. The document concludes by assigning homework for students to find patterns in the real world and read an interview about algorithms.
Intro to Python for High School Students.
Unit #2: classes, as well as docstrings, lambda, map, filter, logging, testing, debugging
Does not include GUI content
Introduces the functional programming ideas of Functor, Apply, Applicative And Monad. Shows how to implement each in Scala with Scalaz and how to validate the implementation using property based test using specs2 and scalacheck.
Game of Life - Polyglot FP - Haskell, Scala, Unison - Part 2 - with minor cor...Philip Schwarz
The document discusses factoring effects out of impure procedures in Scala. It shows an example of a contest function that originally coupled the logic for computing the winner with printing the output. This was refactored to separate the pure winner logic into its own function, while the contest function now handles just calling winner and printing the result. This illustrates a general technique of factoring an impure procedure into a pure core function and separate input/output handling functions to isolate the side effects.
This document discusses monad transformers in Scala. It begins by introducing the OptionT monad transformer, which lifts an Option into a monad M. It defines the point and map methods for OptionT to make it an instance of the Monad type class. Later sections discuss using monad transformers to compose monads like IO and Option that normally do not compose, and how this allows embedding domain-specific languages within programs.
Some languages, like SML, Haskell, and Scala, have built-in support for pattern matching, which is a generic way of branching based on the structure of data.
While not without its drawbacks, pattern matching can help eliminate a lot of boilerplate, and it's often cited as a reason why functional programming languages are so concise.
In this talk, John A. De Goes talks about the differences between built-in patterns, and so-called first-class patterns (which are "do-it-yourself" patterns implemented using other language features).
Unlike built-in patterns, first-class patterns aren't magical, so you can store them in variables and combine them in lots of interesting ways that aren't always possible with built-in patterns. In addition, almost every programming language can support first-class patterns (albeit with differing levels of effort and type-safety).
During the talk, you'll watch as a mini-pattern matching library is developed, and have the opportunity to follow along and build your own pattern matching library in the language of your choice.
Quark: A Purely-Functional Scala DSL for Data Processing & AnalyticsJohn De Goes
Quark is a new Scala DSL for data processing and analytics that runs on top of the Quasar Analytics compiler. Quark is adept at processing semi-structured data and compiles query plans to operations that run entirely inside a target data source. In this presentation, John A. De Goes provides an overview of the open source library, showing several use cases in data processing and analytics. John also demonstrates a powerful technique that every developer can use to create their own purely-functional, type-safe DSLs in the Scala programming language.
Introduction to functional programming using Ocamlpramode_ce
The document provides an introduction to functional programming concepts using Ocaml as the teaching language. It outlines the workshop plan which will cover Ocaml syntax, important functional programming concepts, and understanding the functional paradigm through Ocaml. It then discusses Ocaml background, where Ocaml is used, the Ocaml REPL, function definition, type inference, recursion, tail calls and TCO, higher order functions, algebraic data types, pattern matching, immutability, and more.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
Drawing graphics in C++.NET requires:
1. Creating a Pen object to define the line/shape color and thickness.
2. Getting a Graphics object from the control to draw on using CreateGraphics().
3. Calling DrawLine() or other drawing methods on the Graphics object, passing the Pen and point coordinates.
This document describes a presentation on using the Tagless Final style in the Play Framework for purely functional programming.
The presentation introduces Play Framework and how it uses Google Guice for dependency injection. It discusses separating the program from its execution using techniques like the Reader Monad and Free Monad. However, these have drawbacks like being difficult to use with multiple dependencies.
The presentation then introduces Tagless Final style as an alternative that has less boilerplate than Free Monad and allows separating program and implementation. It demonstrates a basic example of a UserRepository trait and implementation.
The rest of the agenda covers practicing Tagless Final style in the Play Framework, discussing its advantages but also that it is not a silver bullet
The document discusses the Fantom programming language, describing its features such as static typing with dynamic abilities, built-in modularity, and support for concurrency through message passing and immutable objects. It also provides brief biographies of the speakers and an overview of key concepts in Fantom like pods, classes, mixins, and serialization.
This document provides an introduction to event-driven programming and forms using Delphi. It discusses various controls that can be used in forms like labels, edits, combo boxes, check boxes, group boxes, radio buttons, radio groups, and list boxes. It provides examples of how to use these controls and their properties. Tips are also provided like using auto-completion, differentiating between control properties, and changing the application icon. Functions for manipulating strings are also listed.
The document discusses various web technologies including HTML5, CSS, JavaScript, jQuery, ASP.NET, MVC pattern, and more. It provides an overview of each topic with definitions and examples. It also includes a brief history and future directions of web standards.
Utilizing Kinect Control for a More Immersive Interaction with 3D EnvironmentMohammad Shaker
Utilizing Kinect Control for a More Immersive Interaction with 3D Environment. Implemented by Saed Haj Ali, Kinda Tarboush and Marah Halawah and Supervised by me, Dr. Noor Shaker and Dr. Ammar Joukhadar.
The document discusses object cloning in C# programming. It explains shallow cloning versus deep cloning and demonstrates different approaches to cloning objects, including using the ICloneable interface and MemberwiseClone() method. It notes issues with these approaches. The fastest way to do a deep clone, it states, is to serialize an object to a stream and then deserialize it back, which performs a full deep copy. Code is provided to implement this serialization/deserialization cloning approach.
The document discusses 3D rendering in WPF. It provides code examples for creating 3D models like a cuboid using triangles, adding lighting and cameras, and manipulating 3D objects. It also covers using the Viewport2DVisual3D control to display 2D UI elements in a 3D environment. Code is provided to construct the geometry and add 2D components like text blocks and buttons to the visual host.
This document provides an overview of various topics related to mobile application development including cloud computing, interaction design, Android, iOS, web technologies like HTML5 and JavaScript, programming languages like Java and Objective-C, frameworks, gaming, user experience design, and more. It discusses tools for Android development and covers basics of creating an Android app like setting up the IDE, creating the UI, adding interactivity, debugging, and referencing documentation.
The document discusses Windows Workflow Foundation (WF), a framework that enables users to create system or human workflows in applications. WF allows for workflows within line-of-business apps, user interface page flows, document workflows, and more. A WF project can be created to define workflows as classes using C# or XML. The document provides a link to an MSDN tutorial about a simple expense report workflow that routes approvals based on amount and uses controls like If, Assign, and Sequence.
WPF L01-Layouts, Controls, Styles and TemplatesMohammad Shaker
The document provides an overview of Windows Presentation Foundation (WPF) layouts, controls, and other UI elements. It includes code examples for common controls like text boxes, buttons, grids, menus, toolbars and dialog boxes. It also covers more advanced elements like tab controls, scroll viewers, expanders and popups. The document appears to be from a WPF starter course, aiming to introduce developers to the core concepts and building blocks of WPF applications.
The document describes code for implementing a client-server application using TCP sockets in C#. It includes code for initializing connections on both the client and server sides, with the client connecting to the server on a specific port and IP address. Event handler methods are used to handle connection events like accepting new client connections, receiving and sending data. The overall purpose is to create a chat application where the client can connect to the server and they can exchange messages.
Short, Matters, Love - Passioneers Event 2015Mohammad Shaker
Short, Matters, Love is a presentation I prepared for freshmen students at the Faculty of Information Technology in Damascus, Syria organised by Passioneers - 2015
C# Starter L06-Delegates, Event Handling and Extension MethodsMohammad Shaker
The document discusses delegates, events, and extension methods in C#. It explains that delegates allow functions to be passed as parameters and can point to methods. Events use delegates to call subscriber methods when an event is raised. Extension methods extend existing classes with new methods without modifying the original class. The document provides examples of how to use delegates to handle events, attach multiple event handlers, and create anonymous methods. It also demonstrates how to write an extension method to add new functionality to the string class.
This is my project in my third year of studying in the Faculty of Information Technology Engineering in Damascus, Syria, 2011 with Ismaeel Abo Abdalla, Zaher Wanli and Mhd Noor Alhamwi. The project simulates the physics of the car movement with/without Anti Brake-Lock System (ABS), Electronic Stability Program (ESP) and Global Positioning System (GPS) all in realtime.
The document provides an overview of various computer graphics and OpenGL concepts including cube maps, texture mapping, lighting, blending, shadowing, fog, blurring, cameras, clipping, reflection, particles systems, loaders for 3D objects, terrain generation, and sound engines. It also includes code snippets and explanations for implementing concepts like lighting, blending, shadow mapping, and simple particle systems in OpenGL. The document serves as a short introductory course covering essential topics for OpenGL graphics programming.
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]Mohammad Shaker
In my MSc. thesis, I have re-tackled the problem of procedurally generating content for physics-based games I have previously investigated in my BSc. graduation thesis. This time around I propose two novel methods: the first is projection based for faster generation of physics-based games content. The other, The Progressive Generation, is a generic, wide-range, across genre, customisable with playability check method all bundled in a fast progressive approach. This new method is applied on two completely different games: NEXT And Cut the Rope.
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksJinTaek Seo
This document discusses shader programming in Direct3D. It covers vertex and pixel shaders, shader models, and using effects to integrate shaders with the graphics pipeline. Key points include:
- Vertex shaders process vertex data and convert it from model to projection space. Pixel shaders blend per-pixel data into output colors.
- Effects allow integrating shaders with pipeline state and simplify writing shaders for different hardware. Effects contain techniques and passes.
- Parameters can be accessed by semantic or annotation. Semantics specify the purpose and annotations add custom data. Effects are applied by selecting a technique and rendering within Begin/End passes.
This document provides an introduction to shader programming. It discusses that shaders are programs that run on the GPU and include vertex shaders, fragment shaders, and surface shaders. It also covers the basic structure of shaders using CG and how they operate in parallel on multiple vertices and fragments. The document provides references for further reading on shader programming in Unity.
This document provides information about Minko, an open-source 3D engine built with ActionScript. It includes links to Minko's resources like documentation and examples. It discusses how Minko allows developing shaders using ActionScript instead of low-level AGAL, and provides shader examples in ActionScript. It also discusses how Minko enables hardware-accelerated particles using shaders, and previews an upcoming particles editor.
VkRunner: a Vulkan shader test tool (FOSDEM 2019)Igalia
By Neil Roberts.
A presentation of VkRunner which is a tool to help test the compiler in your Vulkan driver using simple high-level scripts.
Perhaps the largest part of developing a modern graphics driver revolves around getting the compiler to generate the correct code. In order to achieve this, extensive testing is essential. For OpenGL we have Piglit and its convenient shader_runner script format. On Vulkan, writing the boilerplate needed to test a simple shader is a lot more work. This is where VkRunner steps in to implement all of the boilerplate once and provide a very high-level scripting language to make it easy to write a test. The scripts contain the required shaders, any data they need to run and simple commands to draw or compute and probe the results.
This talk will give an overview of the functionality of VkRunner, its current status and the plans for its future.
(c) FOSDEM 2019
Brussels, 2 and 3 February 2019
https://fosdem.org/2019/
CC-BY-SA 2.0
The document provides an overview of iOS visual effects capabilities and limitations. It discusses Cocoa Touch's reliance on CALayers for 3D capabilities despite UIViews living in 2D space. It introduces OpenGL and the power of shaders for advanced visual effects. Code examples are provided of various GLSL shaders for effects like color remapping, hue shifting, and edge detection. The document emphasizes the parallel processing capabilities of shaders for complex effects.
The document provides biographical information about Joshua Marris and his experience and interests related to teaching technology and programming. Some key points:
- Joshua Marris is a Systems Administrator who has also taught teachers and students how to use technology and create animations using HTML, CSS, SVG and JavaScript.
- He is interested in learning non-practical applications of programming and was inspired to teach others after using Khan Academy's computer programming course.
- The document goes on to discuss P5.js, a JavaScript library based on Processing, which is used for creative coding, data visualization, and representing natural processes. It provides examples of sketches created with P5.js and discusses some of the basic concepts and functions
Volumetric Lighting for Many Lights in Lords of the FallenBenjamin Glatzel
In this session I’m going to give you an in-depth insight into the design and the implementation of the volumetric lighting system we’ve developed for ‘Lords of the Fallen’. The system allows the simulation of countless volumetric lighting effects in parallel while still being a feasible solution on next-gen consoles.
This presentation was held at the Digital Dragons 2014 conference.
Videos shown during the talk are available here: http://bglatzel.movingblocks.net/publications
A Bizarre Way to do Real-Time LightingSteven Tovey
This document provides a 10 step guide for implementing real-time lighting on the PlayStation 3 (PS3) using its parallel architecture of 6 Synergistic Processing Units (SPUs). It discusses rendering a pre-pass to extract normals and depth, calculating lighting in a tile-based parallel manner on the SPUs, and compositing the final lighting texture. Special techniques like using atomics, striping data across SPUs, and maintaining pipeline balance are needed to optimize performance on the PS3's parallel architecture. The goal is to achieve real-time lighting for a game with 20 cars racing at night, while preserving picture quality and reducing frame latency to acceptable levels.
Rendering AAA-Quality Characters of Project A1Ki Hyunwoo
The document discusses rendering techniques for high quality characters in an unannounced game project called A1. It covers skin rendering using subsurface scattering with multiple scattering approximations. It also covers hair rendering using ordered independent transparency with a linked list approach integrated into UE4, as well as a physically based shading model for hair. Future work discussed includes improvements to subsurface scattering, lighting, and shadowing for transparent and translucent materials.
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksJinTaek Seo
This document provides instructions for implementing normal mapping in 5 steps of a Direct3D game programming tutorial. Step 5 adds normal mapping by including a normal map texture, transforming light and eye vectors to tangent space, and modifying the pixel shader to sample the normal map and calculate lighting in tangent space. The client code is also updated to include the normal map texture and related variables.
Write a Java program that creates a drawing area of appropriate size.pdfboothlynntur11512
Write a Java program that creates a drawing area of appropriate size (try 500 x 500) and draws a
house similar to the one shown below and adding a button to make the house turn on the light,
and anthor button to make the house turn off the light. When turn on the light the windows
should become yellow color.
1.The house should fill up most of the drawing area, i.e. draw it big.
2.The house should be centered horizontally on the screen.
3.The house must have a sloped roof. It can be of any slope or configuration. But you cannot
have a flat roof on the house.
4.Adding a door (centered) and windows
5.Adding a button to make the house turn on the light, and anthor button to make the house turn
off the light. When turn on the light the windows should become yellow color. DrawingTool File
Speed
Solution
These classes are not part of Java but are available through the library named apcslib. You must
have
the file apcslib.jar in the appropriate directory where Java can access it. To have these classes
available in your program, use this command:
import apcslib.*;
Other features of apcslib will be covered in later lessons.
DrawingTool
protected double
protected xPos
protected yPos
protected direction;
protected int width;
protected boolean isDown;
protected Color color;
...
<>
DrawingTool()
DrawingTool(SketchPad)
...
<>
public Color getColor()
public double getDirection()
public Point2D.Double getPosition()
public int getWidth()
public String toString()
<>
public void backward(double)
public void down()
public void drawString(String)
public void drawCircle(double)
public void forward(double)
public void home()
public void move(double)
public void move(double, double)
public void setColor(Color)
public void setDirection(double)
public void setWidth(int)
public String toString()
public void turn (double)
public void turnLeft(double)
public void turnRight(double)
DRAWINGTOOL CLASS SPECIFICATIONS
public void up()
...
Invariant
A DrawingTool object
· Appears in a SketchPad Window (this window is 500 pixels wide and 500 pixels high initially,
but
can be constructed with different dimensions.)
· The origin (0, 0) is at the center of the drawing window.
· Is directed either up, down, left, or right.
· Is either in drawing mode or in moving mode.
Constructor Methods
public DrawingTool()
postcondition
· A new DrawingTool is created and placed in the center (0, 0) of a SketchPad window that
is 500 pixels wide and 500 pixels high.
· This object is set to drawing mode.
· The direction for this object is up (90º).
· The DrawingTool color is set to blue.
· The DrawingTool width is 1.
public DrawingTool(SketchPad win)
postcondition
· A new DrawingTool is created and placed in the center (0, 0) of the SketchPad window
win.
· This object is set to drawing mode.
· The direction for this object is up (90º).
· The DrawingTool color is set to blue.
· The DrawingTool width is 1.
Accessor Methods
public String toString();
postcondition
result = color
public Color getColor();.
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
The document discusses low-level shader optimization techniques for next-generation consoles and DirectX 11 hardware. It provides lessons from last year on writing efficient shader code, and examines how modern GPU hardware has evolved over the past 7-8 years. Key points include separating scalar and vector work, using hardware-mapped functions like reciprocals and trigonometric functions, and being aware of instruction throughput and costs on modern GCN-based architectures.
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
• Using Google, research the use of parallelism and concurrency in video gaming today. Describe how each
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows,
The document provides instructions for programming simple games using a Raspberry Pi and Python. It outlines coding a dice game and a Pass the Pigs game as examples. For the dice game, it defines a function to roll two dice with random numbers and output the total. For Pass the Pigs, it defines a function to roll two dice, output the result and assign points based on the numbers rolled, breaking if a Pig Out or Oinker is rolled. The document guides writing the code, testing it, and executing the Python scripts.
This is a presentation about the basics of rendering, which was made with an intention to help people, who work with real-time graphics applications, understand the steps we need to perform in order to produce the image on the screen.
sdlBasic is a basic interpreter that allows creating simple 2D games across multiple platforms like Linux, Windows, MacOS, and others. It uses the SDL library for graphics and allows working with sprites, sounds, user input and more. The interpreter was created by adapting and combining open source code distributed under licenses like GPL and LGPL.
Gsp 215 Effective Communication / snaptutorial.comHarrisGeorg21
This document provides details for the homework and labs for GSP 215 over 7 weeks. It includes assignments on command line usage, binary representation, memory management, and optimizing program performance. Students are asked to complete homework problems, code implementations, and submit screenshots of their work. The labs involve exploring machine code representations, memory usage, and analyzing algorithm performance.
This document summarizes several new features introduced in C# 8.0, including switch expressions that allow expression bodies for switch statements, property patterns that allow matching on object properties, and asynchronous streams that allow asynchronous iteration over data using await foreach. Other features discussed include default interface methods, static local functions, nullable reference types, indices and ranges for arrays/strings, and null-coalescing assignment.
This document discusses Unity3D and game development. It provides an overview of Unity3D and other game engines like Unreal Engine, comparing their features and costs. Examples are given of popular games made with each engine. The document also lists several games the author has made using Unity3D and provides some additional resources and references.
The document discusses various topics related to mobile application design including cloud interaction, Android touch and gesture interaction, UI element sizing, screen sizes, changing orientation, retaining objects during configuration changes, multi-device targeting, and wearables. It provides examples and guidelines for designing applications that can adapt to different devices and configurations.
The document discusses principles of interaction design, color theory, and game design. It covers topics like primary and secondary colors, color harmonies, using color to attract attention and set mood, the importance of white space and negative space in design, and how games like Journey, Fez, Luftrausers, Monument Valley, Ori and the Blind Forest, and Limbo effectively use techniques like the rule of thirds, establishing a sense of goal, and game feel.
This document discusses various topics related to typography including letter shapes like the letter "T", how words for concepts like water have evolved across languages, symbols for ideas like fish, and different writing styles such as styles that would be impossible to write. It examines typography from multiple perspectives like shapes, language evolution, symbols, and stylization.
Interaction Design L04 - Materialise and CouplingMohammad Shaker
This document discusses various aspects of coupling and interaction design in mobile applications. It addresses good and bad examples of coupling on Android and iOS, such as how apps are switched between. It also discusses using accurate text to represent backend processes, and using faster progress bars to reduce cognitive load on users. Visualizations are suggested to improve progress bars.
The document discusses various options for storing data in an Android application including SharedPreferences for simple key-value pairs, internal storage for private files, external storage for public files, SQLite databases for structured data, network connections for storing data on a web server, and ContentProviders for sharing data between applications. It provides details on using SharedPreferences, internal SQLite databases stored in the application's files, and ContentProviders for sharing Contacts data with other apps.
The document discusses various interaction design concepts in Android including toasts, notifications, threads, broadcast receivers, and alarms. It provides code examples for creating toasts, setting notification priorities, and scheduling alarms to fire at boot or at specific times using the AlarmManager. Broadcast receivers can be used to set alarms during device boot by listening for the BOOT_COMPLETED intent filter and implementing the onReceive callback.
This document provides an overview of various mobile development technologies and frameworks including Cloud, iOS, Android, iPad Pro, Xcode, Model-View-Controller (MVC), C, Objective-C, Foundation data types, functions calls, Swift, iOS Dev Center, coordinate systems, Windows Phone, .NET support, MVVM, binding, WebClient, and navigation. It also mentions tools like Expression Blend and frameworks like jQuery Mobile, PhoneGap, Sencha Touch, and Xamarin.
This document discusses various topics related to mobile app design including user experience (UX), user interface (UI), interaction design, user constraints like limited data/battery and screen size, and using context like location to improve the user experience. It provides examples of a pizza ordering app and making ATM machines smarter. It also covers design patterns and principles like focusing on user needs and testing designs through feedback.
This document discusses principles of visual organization and responsive grid systems for web design. It mentions laws of proximity, similarity, common fate, continuity, closure, and symmetry which help organize visual elements. It also discusses column-based and ratio-based grid systems as well as responsive grid systems that adapt to different screen widths, citing examples from Pinterest, Bootstrap, and the website www.mohammadshaker.com which demonstrates responsive design.
This document provides an overview comparison of key aspects of mobile app development for iOS and Android platforms. It discusses differences in app store policies, pricing, monetization options like ads and in-app purchases, development tools including engines like Unity and Unreal, and the publishing process. Key points mentioned include Android apps averaging over 2.5x the price of similar iOS apps, Apple's restrictive app review policies, the 70/30 revenue split in Google Play Store, and tools for user testing and publishing on both platforms. It also shares stats on the revenue and success of specific apps like Monument Valley.
The document discusses various ways to implement cloud functionality in Android applications using services like Parse and Android Backup. It provides code examples for backing up app data to the cloud using Android Backup, setting up a backend using Parse, pushing notifications with Parse, and performing analytics tracking with Parse.
This document discusses several topics related to developing Android apps including:
1. Adding markers to maps by setting an onMapClickListener and adding a MarkerOptions to the clicked location.
2. Signing into apps with Google accounts using the Google Identity API.
3. Following Material Design guidelines for visual style and user interfaces.
4. Maintaining multiple APK versions and using OpenGL ES for games.
This document discusses various techniques for styling Android applications including adding styles, overriding styles, using themes, custom backgrounds, nine-patch images, and animations. It provides links to tutorials and documentation on animating views with zoom animations and other motion effects.
This document provides information about various Android development topics including:
- ListAdapters and mapping models to UI using an MVVM-like pattern
- Creating custom lists
- Starting a new activity using an Intent and passing data between activities
- Understanding the Android activity lifecycle and methods like onPause() and onResume()
- Handling configuration changes that recreate the activity
- Working with permissions
The document discusses common patterns for working with lists, launching new screens, and handling activity state changes. It also provides code examples for starting a new activity, passing data between activities, and handling the activity lifecycle callbacks.
This document provides an overview of game development topics including types of games, game engines, platforms, and ratings systems. It compares the popular game engines Unity and Unreal Engine, noting their key features such as scripting languages, cost structures, and graphics capabilities. Examples of games built with Unity and Unreal are also mentioned. The document concludes with brief discussions of other game engines like Source and CryEngine, gamification techniques, and uses of games for serious purposes.
1. Mohammad Shaker discusses his rhythm-based game SyncSeven which uses procedural content generation to generate levels based on music.
2. He outlines the music-based content generation process which extracts notes, rhythm and beats from music to drive a game model through a mapper.
3. The talk describes implementing SyncSeven using C# and Unity3D, including features like ads, leaderboards through Google Play, and social sharing.
A software employing Domain-Specific Language (DSL) for Roboconf architecture for distributed cloud-based applications. HTML5 graphical representation along with ECA scaling rules are implemented.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the “Temporal Event Neural Networks: A More Efficient Alternative to the Transformer” tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChip’s Akida neuromorphic hardware IP further enhances TENNs’ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
The Microsoft 365 Migration Tutorial For Beginner.pptxoperationspcvita
This presentation will help you understand the power of Microsoft 365. However, we have mentioned every productivity app included in Office 365. Additionally, we have suggested the migration situation related to Office 365 and how we can help you.
You can also read: https://www.systoolsgroup.com/updates/office-365-tenant-to-tenant-migration-step-by-step-complete-guide/
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...Jason Yip
The typical problem in product engineering is not bad strategy, so much as “no strategy”. This leads to confusion, lack of motivation, and incoherent action. The next time you look for a strategy and find an empty space, instead of waiting for it to be filled, I will show you how to fill it in yourself. If you’re wrong, it forces a correction. If you’re right, it helps create focus. I’ll share how I’ve approached this in the past, both what works and lessons for what didn’t work so well.
What is an RPA CoE? Session 2 – CoE RolesDianaGray10
In this session, we will review the players involved in the CoE and how each role impacts opportunities.
Topics covered:
• What roles are essential?
• What place in the automation journey does each role play?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...Fwdays
Direct losses from downtime in 1 minute = $5-$10 thousand dollars. Reputation is priceless.
As part of the talk, we will consider the architectural strategies necessary for the development of highly loaded fintech solutions. We will focus on using queues and streaming to efficiently work and manage large amounts of data in real-time and to minimize latency.
We will focus special attention on the architectural patterns used in the design of the fintech system, microservices and event-driven architecture, which ensure scalability, fault tolerance, and consistency of the entire system.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Must Know Postgres Extension for DBA and Developer during MigrationMydbops
Mydbops Opensource Database Meetup 16
Topic: Must-Know PostgreSQL Extensions for Developers and DBAs During Migration
Speaker: Deepak Mahto, Founder of DataCloudGaze Consulting
Date & Time: 8th June | 10 AM - 1 PM IST
Venue: Bangalore International Centre, Bangalore
Abstract: Discover how PostgreSQL extensions can be your secret weapon! This talk explores how key extensions enhance database capabilities and streamline the migration process for users moving from other relational databases like Oracle.
Key Takeaways:
* Learn about crucial extensions like oracle_fdw, pgtt, and pg_audit that ease migration complexities.
* Gain valuable strategies for implementing these extensions in PostgreSQL to achieve license freedom.
* Discover how these key extensions can empower both developers and DBAs during the migration process.
* Don't miss this chance to gain practical knowledge from an industry expert and stay updated on the latest open-source database trends.
Mydbops Managed Services specializes in taking the pain out of database management while optimizing performance. Since 2015, we have been providing top-notch support and assistance for the top three open-source databases: MySQL, MongoDB, and PostgreSQL.
Our team offers a wide range of services, including assistance, support, consulting, 24/7 operations, and expertise in all relevant technologies. We help organizations improve their database's performance, scalability, efficiency, and availability.
Contact us: info@mydbops.com
Visit: https://www.mydbops.com/
Follow us on LinkedIn: https://in.linkedin.com/company/mydbops
For more details and updates, please follow up the below links.
Meetup Page : https://www.meetup.com/mydbops-databa...
Twitter: https://twitter.com/mydbopsofficial
Blogs: https://www.mydbops.com/blog/
Facebook(Meta): https://www.facebook.com/mydbops/
Session 1 - Intro to Robotic Process Automation.pdfUiPathCommunity
👉 Check out our full 'Africa Series - Automation Student Developers (EN)' page to register for the full program:
https://bit.ly/Automation_Student_Kickstart
In this session, we shall introduce you to the world of automation, the UiPath Platform, and guide you on how to install and setup UiPath Studio on your Windows PC.
📕 Detailed agenda:
What is RPA? Benefits of RPA?
RPA Applications
The UiPath End-to-End Automation Platform
UiPath Studio CE Installation and Setup
💻 Extra training through UiPath Academy:
Introduction to Automation
UiPath Business Automation Platform
Explore automation development with UiPath Studio
👉 Register here for our upcoming Session 2 on June 20: Introduction to UiPath Studio Fundamentals: https://community.uipath.com/events/details/uipath-lagos-presents-session-2-introduction-to-uipath-studio-fundamentals/
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyScyllaDB
Freshworks creates AI-boosted business software that helps employees work more efficiently and effectively. Managing data across multiple RDBMS and NoSQL databases was already a challenge at their current scale. To prepare for 10X growth, they knew it was time to rethink their database strategy. Learn how they architected a solution that would simplify scaling while keeping costs under control.
7. The interpolator next to
the rasterizer calculates
this value, by interpolating
the color value of the
corner points.
8. This means that a pixel
exactly in the middle
between a blue and a red
corner point, will get the
color that is exactly in the
middle of these colors.
13. You could also do this
in your XNA app, but
then your CPU would
have to perform those
calculations, which
would lower your
framerate!
14. Now you can have these
calculations done by the
GPU, which is A LOT faster
at it, leaving your CPU free
to perform more important
calculations
15. As you have seen,
Using the vertex shader,
you could also adjust
the color, which we’ve
done before (we made
our whole triangle
white)
16. So for this example, we will throw away
the color information provided to us by the
vertex stream, and define our own colors.
Say, we want our vertex shader make the
red color component indicate the X
coordinate of each vertex, the green
component the Y coordinate, and the blue
color component indicate the z coordinate.
19. Experimenting With Shaders
• Go to our last HLSL file “.fx”
– Replace the following line
Output.Color = inColor;
20. Experimenting With Shaders
• Go to our last HLSL file “.fx”
– Replace the following line
– With this one
Output.Color = inColor;
Output.Color.rgb = inPos.xyz;
21. Experimenting With Shaders
• Go to our last HLSL file “.fx”
– Replace the following line
– With this one
Output.Color = inColor;
Output.Color.rgb = inPos.xyz;
22. Experimenting With Shaders
• Go to our last HLSL file “.fx”
– Replace the following line
– With this one
Output.Color = inColor;
Output.Color.rgb = inPos.xyz;
23. Experimenting With Shaders
• Go to our last HLSL file “.fx”
– Replace the following line
– With this one
Output.Color = inColor;
Output.Color.rgb = inPos.xyz;
24. Experimenting With Shaders
• Go to our last HLSL file “.fx”
– Replace the following line
– With this one
Output.Color = inColor;
Output.Color.rgb = inPos.xyz;
29. Experimenting With Shaders
• So what is happening?
• Before the colors are passed to the interpolator, the
3 color values of the 3 vertices are being clipped to
the [0,1] region. For example, the (-2,-2,2) vertex
should have -2, -2 and 2 as rgb color values, but it
gets 0, 0 and 1 as color values
30. Experimenting With Shaders
• So what is happening?
• The (0,0,0) point gets a color value that is an
interpolation of color values between the [0,1]
region, and thus will never be completely 0,0,0
(=black).
42. Shaders - Samples
• Texturing our triangle using the Pixel Shader
• Read more
– http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Textured_triangle.php
43. Shaders - Samples
• A logical next step would be to load a texture from within our XNA app, and have our
pixel shader sample the correct color for each pixel.
54. Shaders - Samples
• Creating your first light
• Read more
– http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Per-pixel_lighting.php
55. Shaders - Samples
• Every object is lit by an amount of light, which depends on the angle between the normal
and the direction of the light.
56. Shaders - Samples
• Every object is lit by an amount of light, which depends on the angle between the normal
and the direction of the light.
• This is found by taking the dot product between that object’s normal and the direction of
the incoming light.
65. Shaders - Samples
• Transforming vertices to texture space using Projective Texturing
• Reading more
– http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Projective_texturing.php