Modify Program 12.4 to utilize a height map of your own design. Then add lighting and shadow
Question:
Modify Program 12.4 to utilize a height map of your own design. Then add lighting and shadow mapping so that your tessellated terrain casts shadows. This is a complex exercise, because some of the code in the first and second shadow mapping passes will need to be moved to the evaluation shader.
Program 12.4
Transcribed Image Text:
Java/JOGL application // same as for Bezier surface example, with these changes: gl.glPatchParameteri(GL_PATCH_VERTICES, 4); gl.glDrawArraysInstanced (GL_PATCHES, 0, 4, 64*64); Vertex Shader out vec2 tc; void main(void) {vec2 patch TexCoords[] = vec2[] (vec2(0,0), vec2(1,0), vec2(0,1), vec2(1,1)); // compute an offset for coordinates based on which instance this is int x = gl_InstanceID % 64; int y = gl_InstancelD / 64;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
Answered By
Nazrin Ziad
I am a post graduate in Zoology with specialization in Entomology.I also have a Bachelor degree in Education.I posess more than 10 years of teaching as well as tutoring experience.I have done a project on histopathological analysis on alcohol treated liver of Albino Mice.
I can deal with every field under Biology from basic to advanced level.I can also guide you for your project works related to biological subjects other than tutoring.You can also seek my help for cracking competitive exams with biology as one of the subjects.
3.30+
2+ Reviews
10+ Question Solved
Related Book For
Computer Graphics Programming In OpenGL With JAVA
ISBN: 9781683922193
2nd Edition
Authors: V. Scott Gordon PhD, John L. Clevenger PhD
Question Posted:
Students also viewed these Computer science questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
THIRD AVENUE SOFTWARE HEALTH-CARE APP PROJECT This case is new for the ninth edition of Information Technology Project Management . The case provides an opportunity to apply agile and Scrum...
-
Test Program 12.5 with the layout specifier in the evaluation shader set to equal_spacing, and then to fractional_even_spacing, as described in Section 12.4. Observe the effects on the rendered...
-
What is the rate of change of the area of a circle (A = r 2 ) with respect to the radius when the radius is r = 3?
-
Let x[n] denote a causal, complex-valued sequence with Fourier transform X(e j ) = X R (e j ) + j X I (e j ). If X R (e j ) = 1 + cos() + sin () sin(2), determine X I (e j ).
-
Eclipse Computer Company has been purchasing carrying cases for its portable computers at a delivered cost of $ 65 per unit. The company, which is currently operating below full capacity, charges...
-
Let \(f(\theta)\) be the \(2 \pi\)-periodic function determined by the formula \[f(\theta)=|\sin \theta|, \quad \text { for }-\pi \leq \theta \leq \pi\] Show that the Fourier series for \(f\) is...
-
Assume that you are purchasing an investment and have decided to invest in a company in the digital phone business. You have narrowed the choice to Best Digital Corp. and Every Zone, Inc. and have...
-
What are the FASB codifications regarding auction rate securities, collateralized debt obligations, fixed-for-float OTC gas swap, and auction rate securities?
-
Modify Program 14.4 (the version including the modification in Figure 14.10 that produces a 3D cubed texture) so that it instead textures the Studio 522 dolphin. Then observe the results. Many people...
-
Modify Program 12.1 to experiment with various values for inner and outer tessellation levels and observing the resulting rendered mesh. Program 12.1 Java/JOGL application public int createShader...
-
Explain how marketing can be perceived as having a negative impact on the consumer.
-
What are the different organizational phases in the life cycle of businesses? What has to be done to make the organizational changes?
-
Suppose that [e, e..... e] is a list of k integers. The following table defines some operations on such lists. Each operation works in 0(1) time. 07 08 Operation [] [e] 01 MERGE(left, right) 02 both...
-
What are the key components of an effective goal-setting phase in the HR planning process? Communicating a program's details to the affected employees Creating a transitional matrix Identifying a...
-
For the healthcare industry, go back to Yahoo Finance. http://finance.yahoo.com/sector/healthcare. Select three distinct businesses from the same industry sector (for instance, a healthcare provider,...
-
User Datagram packet (UDP) format is given below. 8 bytes Header Source port number 16 bits Total length 16 bits Data Destination port number 16 bits Checksum 16 bits The content of a UDP header in...
-
The payroll procedures used by three different companies are: 1. In Brewer Cafe, each employee is required to mark on a clock card the hours worked. At the end of each pay period, the employee must...
-
Use the information given about the angles and to find the exact value of: (a) sin( + ) (b) cos( + ) (c) sin( - ) (d) tan ( + ) (e) sin(2) (f) cos (2) (g) sin /2 (h) cos/2 cos = 4/5, 0 < < /2; cos =...
-
Sante Fe Corporation's sales office and manufacturing plant are located in State A. Sante Fe also maintains a manufacturing plant and sales office in State B. For purposes of apportionment, State A...
-
For each of the following items considered independently, indicate whether the circumstances call for an addition modification (A), a subtraction modification (S), or no modification (N) in computing...
-
Perk Corporation is subject to tax only in State A. Perk generated the following income and deductions. Federal taxable income .............. $300,000 State A income tax expense ............. 15,000...
-
As HIM director, you are preparing the budgets for your department. A memo that accompanied the annual worksheets for capital and operational budgets stated all educational expenses are being cut...
-
A manufacturing company has the choice of two suppliers to buy a piece of equipment from to use in its process. Characteristics of these two suppliers and associated costs are tabulated below. The...
-
A company has three factories A, B and C which supply to four warehouses P, Q, R and S. The monthly production capacity in tons at A, B and C is 120, 80, and 200 respectively. The monthly requirement...
Study smarter with the SolutionInn App