EffectComposer - Retrieve the visual output produced by the Composer

Hey there,

I've encountered an issue with the EffectComposer that I could use some help with.

Here's what I'm attempting to do: I'm working on dividing up the post-processing effects in my App across different EffectComposers. My goal is to calculate 5 shaders in EffectComposer1, then take the resulting image and pass it as a uniform into another EffectComposer, say EffectComposer2. The geometry and texture used in EffectComposer1 are both compatible, pixel-size wise, with the uniform needed in EffectComposer2.

As far as I'm aware, the EffectComposers' write/readBuffer should contain the texture that would be rendered to the screen if no effect is set to renderToScreen = true;.

If you require any additional information to help resolve this issue, please don't hesitate to ask.

Thanks, Michael

Using three.js r82

Answer №1

And that's a wrap!

After some tweaking and submitting an issue on GitHub, I managed to resolve the problem at hand.

I'm sticking with this solution for now as it's working perfectly.

Below is the code snippet I used to generate my texture:

const canvasElement = document.getElementById("CanvasOne"); // Access the filled canvas
const texture = new THREE.CanvasTexture(canvasElement); // Create the texture

// Configure the texture filters
texture.magFilter = THREE.LinearFilter;
texture.minFilter = THREE.LinearFilter;
texture.generateMipmaps = false; // Disable mipmaps to prevent image distortion

Now, I can utilize texture as a uniform in my project.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is a more efficient method for structuring this React page while making an asynchronous request to the API?

When developing, I encountered this scenario where I needed to ensure that a certain useEffect function only runs once. To achieve this, I established router.query.something as a dependency for the effect. The logic is such that the request will only trigg ...

The connection to Cordova.js is established, but the deviceready event is not

I've included cordova.js in my project, called app.initialize();, but for some reason deviceready event is not being triggered. Any ideas on what might be causing this issue? Here's the JavaScript code: var app = { initialize: function() { ...

How can I store the city name instead of the city id in the database when submitting data from a dependent dropdown select in Ajax PHP?

For the past few days, I have been unable to solve a problem. The issue is as follows: I have a web form with dependent dropdown select boxes where users can choose their city, zip code, and street. However, when the form is submitted, only the city_id ( ...

Using jQuery to locate the href attribute within a TD element with a specific

Update URL <td class="posts column-posts"><a href="edit.php?tshowcase-categories=ops&amp;post_type=tshowcase">2</a></td> Current URL: <span class="view"><a href="https://blog.company.com/team/tshowcase-categories/ops ...

When browserify is utilized, the error "function is not defined" may show up as an Un

Exploring an example at and attempting a function call as shown below: My HTML code is: <!DOCTYPE html> <html> <head> <title>Testing Browserify</title> <script src="bundle.js"></script> </head> <body& ...

Spinning html/css content using JavaScript

Greetings! I am currently working on a demo site using just HTML, CSS, and JavaScript. Typically, I would use Ruby and render partials to handle this issue, but I wanted to challenge myself with JavaScript practice. So far, I have created a code block that ...

Utilize ng-show/ng-hide to dynamically display messages or content based on the results obtained

One of my functions builds and returns a JSON object like this: {"message":"No Grupos de MetaDetalles found","entities":[],"breadcrumbs":[],"parent_id":0} Now, I have an Angular view set up like this: <table id="example-datatables" class="table table ...

What is the process of overriding methods in a function-based component in React?

Overriding in a parent component works when it is a class-based component // Parent Button Class class Button extends React.Component { createLabel = () => { return <span>{this.props.label}</span>; }; render() { return <butt ...

Issues with JQuery list selectors

Many individuals have raised concerns about selectors in the past, but no matter what I try, my code seems right yet it doesn't work as intended. My situation involves a list of actions that are displayed or hidden when their corresponding "folder" is ...

Tooltips experience issues when interacting with elements that do not utilize the :active state

$(function () { $('[data-toggle="tooltip"]').tooltip() }) <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" ...

Creating PDFs with barcodes using Node.js

Currently, I am utilizing https://github.com/devongovett/pdfkit to create PDF files easily. This can be achieved with a simple code snippet like below: app.get('/get-pdf', (req, res) => { const doc = new PDFDocument(); const filename = &ap ...

Parcel Bundler works perfectly fine on localhost, however, an error is being displayed on the index.html file in the Dist folder

Currently, I am in the process of learning how to use Parcel for bundling purposes. I have set up a index.html file that is connected with index.js. Surprisingly, everything works perfectly fine when I access it via localhost:1234 using Parcel. However, wh ...

Can you suggest a simple method for implementing the "componentDidUpdate()" lifecycle method using just JavaScript?

I've been curious about replicating the componentDidUpdate() lifecycle method in JavaScript on my own. It got me thinking, how did React and Vue.JS create their own lifecycle methods? I attempted to study the minified version of Vue.JS but found it qu ...

Passing props from parent component to map function in ReactJS results in undefined props

In my project, I dynamically create <textarea> elements using the map() function. Each textarea should have a unique value when the component is rendered. // Within the render method of ComponentA fruits.map((fruit) => { return <textarea na ...

Encountering difficulties obtaining server response while utilizing dropzone.js version 4

I am currently using dropzone.js version 4 to facilitate file uploads from a webpage to my server. While the upload process is functioning properly, I am encountering difficulty in retrieving the server response. It should be noted that I am creating the D ...

Sending colored output from stdout to grunt's output stream

Having trouble creating a custom grunt task that runs mocha tests and displays colored output? I'm running into an issue where grunt is stripping out the colors from the mocha command's output. Here's the code for the grunt task: var exec = ...

Retrieve the identifier of the higher-order block when it is clicked

When I have a parent block with a nested child block inside of it, I expect to retrieve the id of the parent when clicked. However, the event target seems to be the child element instead. Is there a way for JavaScript to recognize the parent as the event ...

On what occasion is a DOM element considered "prepared"?

Here's a question that might make you think twice: $(document).ready(function() { }); Sometimes, the simplest questions lead to interesting discussions. Imagine having a list of elements like this: <body> <p>Paragraph</p> < ...

Trigger the rowContextMenu in Tabulator Table by clicking a Button

Is there a way to add a button at the end of a table that, when clicked, opens a rowContextMenu below the button? Additionally, can the rowContextMenu pop up when right-clicking anywhere on the row? I have attempted some solutions without success. Here is ...

Tips on generating model names dynamically within a service

I am currently utilizing a service to assign unique numbers to model names. The resulting data structure is as follows: "sectionInputs": [ { "model": "price_min1" }, { "model": "price_max2" }, { "model": "units_occ3" }, { "m ...