Practical Texturing (WebGL) CS559 Fall 2016 Lecture 20 November 7th 2016

Similar documents
Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

WebGL and GLSL Basics. CS559 Fall 2016 Lecture 14 October

WebGL and GLSL Basics. CS559 Fall 2015 Lecture 10 October 6, 2015

The Graphics Pipeline

Drawing Fast The Graphics Pipeline

The Graphics Pipeline

Discussion 3. PPM loading Texture rendering in OpenGL

Drawing Fast The Graphics Pipeline

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Steiner- Wallner- Podaras

Buffers. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Lecture 2. Shaders, GLSL and GPGPU

CT5510: Computer Graphics. Texture Mapping

Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently

CISC 3620 Lecture 7 Lighting and shading. Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping

PROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.

Ciril Bohak. - INTRODUCTION TO WEBGL

CS 354R: Computer Game Technology

Case 1:17-cv SLR Document 1-3 Filed 01/23/17 Page 1 of 33 PageID #: 60 EXHIBIT C

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object...

EE 4702 GPU Programming

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

BCA611 Video Oyunları için 3B Grafik

CS452/552; EE465/505. Texture Mapping in WebGL

OUTLINE. Implementing Texturing What Can Go Wrong and How to Fix It Mipmapping Filtering Perspective Correction

Drawing Fast The Graphics Pipeline

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

CS452/552; EE465/505. Image Processing Frame Buffer Objects

CSE 167: Introduction to Computer Graphics Lecture #7: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Texture mapping. Computer Graphics CSE 167 Lecture 9

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

We assume that you are familiar with the following:

CS212. OpenGL Texture Mapping and Related

CS 432 Interactive Computer Graphics

CS4620/5620: Lecture 14 Pipeline

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Texture Mapping. Computer Graphics, 2015 Lecture 9. Johan Nysjö Centre for Image analysis Uppsala University

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

The Rasterization Pipeline

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

OPENGL RENDERING PIPELINE

CS 130 Final. Fall 2015

Rendering Objects. Need to transform all geometry then

Models and Architectures

Case 1:17-cv SLR Document 1-4 Filed 01/23/17 Page 1 of 30 PageID #: 75 EXHIBIT D

Introduction to Computer Graphics with WebGL

Graphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

last time put back pipeline figure today will be very codey OpenGL API library of routines to control graphics calls to compile and load shaders

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

CS 4620 Program 3: Pipeline

The Application Stage. The Game Loop, Resource Management and Renderer Design

Graphics Processing Unit Architecture (GPU Arch)

CS179: GPU Programming

Copyright Khronos Group 2012 Page 1. Teaching GL. Dave Shreiner Director, Graphics and GPU Computing, ARM 1 December 2012

CS 432 Interactive Computer Graphics

CPSC 436D Video Game Programming

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Graphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

CS427 Multicore Architecture and Parallel Computing

Hardware- Software Co-design at Arm GPUs

Overview. Goals. MipMapping. P5 MipMap Texturing. What are MipMaps. MipMapping in OpenGL. Generating MipMaps Filtering.

Spring 2009 Prof. Hyesoon Kim

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Com S 336 Final Project Ideas

Magnification and Minification

Introduction to OpenGL/GLSL and WebGL GLSL

Lecture 19: OpenGL Texture Mapping. CITS3003 Graphics & Animation

Rasterization-based pipeline

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Monday Morning. Graphics Hardware

CS451Real-time Rendering Pipeline

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

GeForce4. John Montrym Henry Moreton

Course Recap + 3D Graphics on Mobile GPUs

Vulkan: Architecture positive How Vulkan maps to PowerVR GPUs Kevin sun Lead Developer Support Engineer, APAC PowerVR Graphics.

Rasterization. CS4620/5620: Lecture 12. Announcements. Turn in HW 1. PPA 1 out. Friday lecture. History of graphics PPA 1 in 4621.

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Hardware-driven Visibility Culling Jeong Hyun Kim

We will use WebGL 1.0. WebGL 2.0 is now being supported by most browsers but requires a better GPU so may not run on older computers or on most cell

Lecture 5 Vertex and Fragment Shaders-1. CITS3003 Graphics & Animation

Game Graphics & Real-time Rendering

Computer Graphics Lecture 2

Shaders (some slides taken from David M. course)

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

Pipeline Operations. CS 4620 Lecture 10

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Drawing in 3D (viewing, projection, and the rest of the pipeline)

CIS 581 Interactive Computer Graphics

WebGL A quick introduction. J. Madeira V. 0.2 September 2017

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Lighting and Texturing

CS475/CS675 - Computer Graphics. OpenGL Drawing

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

CSE4030 Introduction to Computer Graphics

Introduction to Shaders.

PowerVR Hardware. Architecture Overview for Developers

Transcription:

Practical Texturing (WebGL) CS559 Fall 2016 Lecture 20 November 7th 2016

In brief Starting with a simple model

In brief Caveat : Issues with sampling & aliasing associate texture coordinates with primitives (can now do procedural textures)

In brief Caveat : Loading files, cross-origin issues load an actual image, use mipmap (and figure out how to use it from shaders)

In brief then combine texture with color

In brief then combine texture with color, or lighting

Add-ons Repeating/clamping Texture coordinates

Add-ons Multiple textures

Add-ons Bump mapping More effects next week

Texture coordinates jsbin.com/pitetahihu/edit.js start(){ initshaders(); senddata(); draw(); }

Texture coordinates jsbin.com/pitetahihu/edit.js start(){ initshaders(); senddata(); draw(); } vertexshader fragmentshader

Texture coordinates jsbin.com/pitetahihu/edit.js start(){ initshaders(); senddata(); draw(); }

Texture coordinates jsbin.com/pitetahihu/edit.js start(){ initshaders(); senddata(); draw(); }

Aliasing jsbin.com/pitetahihu/edit Mismatch between: Texture feature size (color tiles) Fragment size

Texturing with images jsbin.com/varefelatu/edit (texture image)

Applica'on Program The full fixed-function pipeline (1992) Graphics Driver Command Buffer (Triangle Queue) Vertex Queue Vertex Processing (TCL) Vertex Cache Assembly Triangle Processing Rasterize Pixel Queue Pixel Processing Pixel Tests Vertex shading Geometry Shading Pixel Shading 8 TMU minimum (default : texture unit 0) Texture Memory Render to texture Frame Buffer

Texturing with images jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() }

Texturing with images jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() }

Texturing with images jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() }

Texturing with images jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() }

Texturing with images jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() } Options gl.texture_2d gl.texture_cube_map

Texturing with images jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() } Options gl.linear_mipmap_linear gl.linear_mipmap_nearest gl.nearest_mipmap_linear

Texturing with images jsbin.com/varefelatu/edit fragmentshader.js start(){ initshaders(); senddata(); inittextures(); draw() } attach to TMU #0

Texturing with images jsbin.com/varefelatu/edit fragmentshader.js start(){ initshaders(); senddata(); inittextures(); draw() }

Texturing with images jsbin.com/varefelatu/edit fragmentshader.js start(){ initshaders(); senddata(); inittextures(); draw() } lookup returns vec4

Texturing with images (non-mipmap filters) jsbin.com/varefelatu/edit.js start(){ initshaders(); senddata(); inittextures(); draw() } Options gl.linear gl.nearest

jsbin.com/qoyudupoqe/edit Texturing with images (asynchrony issues).js start(){ initshaders(); senddata(); inittextures(); draw() }

Texturing with images (cross-origin issues) jsbin.com/qoyudupoqe/edit.js start(){ initshaders(); senddata(); inittextures(); draw() } http://myurl.com/cube.js

Texturing with images (cross-origin issues) jsbin.com/varefelatu/edit Cross-origin resource sharing disallowed More restrictive policy for Canvas drawing than viewing in web page (img tag) Some browsers even don t recognize file:// as a shared origin

Texturing with images jsbin.com/qoyudupoqe/edit (cross-origin issues) workarounds Must be CORS-approved

Texturing with images jsbin.com/gekavofimu/edit (cross-origin issues) workarounds

Texturing and lighting jsbin.com/kecizocura/edit jsbin.com/voyexukevi/edit fragmentshader

Multiple textures jsbin.com/popojatufi/edit fragmentshader.js start(){ initshaders(); senddata(); inittextures(); draw() }

jsbin.com/weluvebodu/edit Multiple textures.js start(){ initshaders(); senddata(); inittextures(); draw() }